Simplify, improve validations
This commit is contained in:
@@ -53,7 +53,7 @@ Wrap each action in its own ```tool block:
|
||||
{"tool": "journal_update", "args": {"add": ["Investigate the mine"], "done": ["Defeat the demon"]}}
|
||||
```
|
||||
```tool
|
||||
{"tool": "finalize_turn", "args": {"user_prompt": "What do you do?", "ambience": "dungeon"}}
|
||||
{"tool": "finalize_turn", "args": {"ambience": "dungeon"}}
|
||||
```
|
||||
|
||||
You are the sole authority over the game state. The player's action is a **proposal**, not a fact. If their action contradicts the character sheet (e.g. using an item they don't have, spending cash they don't have, claiming stats they don't have), narrate the failure and do NOT call any state-changing tools.
|
||||
|
||||
@@ -20,7 +20,7 @@ TOOL_REGISTRY: dict[str, dict] = {
|
||||
"replace_note": {"description": "Replace note by exact match.", "args": {"before": "exact text", "after": "new text"}},
|
||||
"world_update": {"description": "Replace world state.", "args": {"content": "full world markdown"}},
|
||||
"journal_update": {"description": "Update TODO/DONE.", "args": {"add": "[...]", "done": "[...]"}},
|
||||
"finalize_turn": {"description": "End turn.", "args": {"user_prompt": "question for player", "ambience": "soundscape name"}},
|
||||
"finalize_turn": {"description": "End turn.", "args": {"ambience": "soundscape name"}},
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ def validate_action(
|
||||
|
||||
text = call_llm(
|
||||
[{"role": "user", "content": prompt}],
|
||||
max_tokens=512,
|
||||
max_tokens=1024,
|
||||
temperature=0.2,
|
||||
label="Action validation",
|
||||
on_debug=on_debug,
|
||||
|
||||
Reference in New Issue
Block a user