GuessItCreator
Host-only authoring node for the GuessIt game. It lets you enter a question, generate suggested answers via LLM (with synonyms and scores), edit the results, and then save + start a GuessIt node in your workshop.
Example structures
Minimal creator node
{
"type": "GuessItCreator",
"data": { "question": "", "isGenerating": false }
}
With generated data attached
{
"type": "GuessItCreator",
"data": {
"question": "Nenne einen Bereich, wo man KI einsetzen kann.",
"isGenerating": false,
"generatedData": {
"type": "GuessIt",
"data": {
"text": "Nenne einen Bereich, wo man KI einsetzen kann.",
"answers": [
{ "position": 1, "answer": "Bildbearbeitung", "score": 35, "synonyms": ["Foto", "Bilderkennung"], "isRevealed": false },
{ "position": 2, "answer": "Kundensupport", "score": 25, "synonyms": ["Support", "Chatbot"], "isRevealed": false },
{ "position": 3, "answer": "Medizin", "score": 20, "synonyms": ["Gesundheit", "Diagnose"], "isRevealed": false },
{ "position": 4, "answer": "Bildung", "score": 15, "synonyms": ["Lehre", "Lernen"], "isRevealed": false },
{ "position": 5, "answer": "Finanzen", "score": 5, "synonyms": ["Bank", "Trading"], "isRevealed": false }
],
"answerTime": 60,
"maxFails": 3
}
}
}
}
Properties
| Key | Type | Default | Description |
|---|---|---|---|
data.question | string | — | Prompt used to generate canonical answers. Also becomes the GuessIt.data.text. |
data.isGenerating | boolean | false | UI state flag while a generation job is running. |
data.generatedData | object | — | LLM result structured exactly like a GuessIt node payload. Optional until generation completes. |
Actions (client → server)
The creator uses action-based messages. Payload values are URL-encoded where appropriate.
generate— Start LLM generation- Payload:
{ question: "<text>" }
- Payload:
reset— Clear pending data and start over- Payload:
{}
- Payload:
update_answer— Edit an answer’s text- Payload:
{ position: number, field: "answer", value: "<text>" }
- Payload:
update_score— Edit an answer’s score- Payload:
{ position: number, score: number }
- Payload:
update_synonym— Manage synonyms- Payload:
{ position: number, operation: "add"|"remove"|"edit", synonymIndex?: number, synonymValue?: string }
- Payload:
save_and_start— Persist to workshop and switch to the GuessIt node- Payload:
{}
- Payload:
Save & start flow
- Validate that the sum of all
scorevalues equals 100; otherwise, saving is blocked. - If a
GuessItnode already follows the creator, it is updated; otherwise, one is inserted after the current node. - The workshop is saved and the host view navigates to the
GuessItnode to begin the game.
LLM integration
- Generation endpoint: the web app calls
/api/llm/guessit/generate(Next.js API route) which in turn forwards the result to Nakama via RPCguessit_llm_generate_result. - Clustering used during gameplay:
/api/llm/guessit/cluster→ Nakama RPCguessit_llm_cluster_result. - Secure with
NEXT_LLM_SHARED_SECRET(present in both apps) so only trusted calls are accepted.
Environment Variables
For the environment variables see the GuessIt documentation.
Tips
- Use short, concrete answer labels (synonyms can carry variants).
- You can tweak generated results before saving; changes are synchronized via the
update_*actions.