feat: post-turn state-update pass per present entity
This commit is contained in:
+15
-1
@@ -36,11 +36,25 @@ def client(tmp_path, monkeypatch):
|
||||
{"segments": [{"kind": "dialogue", "text": "hello"}]}
|
||||
)
|
||||
canned_response = "Hi there."
|
||||
# Two state-update classifier calls fire after the assistant_turn
|
||||
# (one per directed edge: bot->you, you->bot). We feed them benign
|
||||
# zero-delta JSON so the existing assertions about ``user_turn`` /
|
||||
# ``assistant_turn`` are unaffected.
|
||||
canned_state_update = json.dumps(
|
||||
{"affinity_delta": 0, "trust_delta": 0, "knowledge_facts": []}
|
||||
)
|
||||
|
||||
# Import here so env vars are visible to the dependency lookup.
|
||||
from chat.web.kickoff import get_llm_client
|
||||
|
||||
mock = MockLLMClient(canned=[canned_parse, canned_response])
|
||||
mock = MockLLMClient(
|
||||
canned=[
|
||||
canned_parse,
|
||||
canned_response,
|
||||
canned_state_update,
|
||||
canned_state_update,
|
||||
]
|
||||
)
|
||||
app.dependency_overrides[get_llm_client] = lambda: mock
|
||||
|
||||
with TestClient(app) as c:
|
||||
|
||||
Reference in New Issue
Block a user