diff --git a/evals/test_personal_notes.py b/evals/test_personal_notes.py index cd89de2..02891e3 100644 --- a/evals/test_personal_notes.py +++ b/evals/test_personal_notes.py @@ -47,11 +47,23 @@ def _run(mock_config, eval_db, eval_dialogue_memory, query, notes=None, partial= from jarvis.reply.engine import prepare_intent from voice_worker.brain import similar assert similar(partial, query) - kw = {"intent_judge": True, "prepared_tools": prepare_intent( - mock_config, partial, eval_dialogue_memory, False, notes_available=True)} + # The same offer as the app (voice_worker/brain.py): chat, schedule, notes and screen. + prepared = prepare_intent(mock_config, partial, eval_dialogue_memory, True, + schedule_available=True, notes_available=True, screen_available=True) + print(f"\n notes [{JUDGE_MODEL}] prepared on {partial!r}: {prepared}") + assert prepared is not None, "the intent judge made no pick, so nothing would be reused" + assert "personalNotes" in prepared, prepared + kw = {"intent_judge": True, "prepared_tools": prepared} turn_state.reset() turn_state.set_user("100") turn_state.set_notes(backend) + if partial is not None: + from test_chat_channels_tool import FakeChat + from test_schedule_tool import FakeSchedules + from test_screen_view_tool import FakeScreen + turn_state.set_chat(FakeChat()) + turn_state.set_schedule(FakeSchedules()) + turn_state.set_screen(FakeScreen()) try: reply = run_reply_engine(db=eval_db, cfg=mock_config, tts=None, text=query, dialogue_memory=eval_dialogue_memory, history=HistoryContext(),