| """One-off probe: re-run the buggy Derek scenario after prompt fixes.""" |
| import json |
| import sys |
|
|
| sys.path.insert(0, ".") |
| from game import llm, prompts, validator |
| from game.state import GameState |
|
|
| s = GameState(session_id="probe") |
| s.revenue = 0 |
|
|
| CRISIS = { |
| "headline": "Derek's New Pitch: The Ultimate Disaster", |
| "intro": "I've got a new pitch, and I'm not sure if I should even bother.", |
| "option_a": "Reject the pitch outright, sending it back with a sarcastic note.", |
| "option_b": "Accept the pitch and present it, hoping to salvage something.", |
| } |
|
|
| sys_p, usr_p = prompts.crisis_prompt(s, "derek", CRISIS, "option_a", "") |
| out, live = llm.call_model(s, "crisis", sys_p, usr_p, npc_id="derek", |
| response_type="option_a", player_response="", |
| crisis=CRISIS) |
| v = validator.validate_crisis(dict(out), s, "derek") if out else None |
| print(json.dumps(out, indent=1)) |
| print("live:", live, "| valid:", v is not None) |
|
|