From d368efdeda5998f6037f89993093352585d06d5a Mon Sep 17 00:00:00 2001 From: Lorenze Jay Date: Tue, 18 Feb 2025 14:35:12 -0800 Subject: [PATCH] Update AgentExecutionStartedEvent to use task_prompt - Modify test_events.py to use task_prompt instead of inputs - Simplify event input validation in test case - Align with recent event system refactoring --- tests/utilities/test_events.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/utilities/test_events.py b/tests/utilities/test_events.py index 8a2142ca0..68bda7bec 100644 --- a/tests/utilities/test_events.py +++ b/tests/utilities/test_events.py @@ -206,16 +206,11 @@ def test_agent_emits_execution_started_and_completed_events(): assert received_events[0].agent == base_agent assert received_events[0].task == base_task assert received_events[0].tools == [] - assert received_events[0].inputs == { - "ask_for_human_input": False, - "input": "Just say hi\n" - "\n" - "This is the expected criteria for your final answer: hi\n" - "you MUST return the actual complete content as the final answer, not a " - "summary.", - "tool_names": "", - "tools": "", - } + assert isinstance(received_events[0].task_prompt, str) + assert ( + received_events[0].task_prompt + == "Just say hi\n\nThis is the expected criteria for your final answer: hi\nyou MUST return the actual complete content as the final answer, not a summary." + ) assert isinstance(received_events[0].timestamp, datetime) assert received_events[0].type == "agent_execution_started" assert isinstance(received_events[1].timestamp, datetime)