Simplify, improve validations

This commit is contained in:
Dejvino
2026-07-01 21:42:05 +02:00
parent 433be9a4a4
commit c5c40225a3
5 changed files with 6 additions and 238 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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"}},
}
+1 -1
View File
@@ -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,