diff --git a/pilot/helpers/agents/test_CodeMonkey.py b/pilot/helpers/agents/test_CodeMonkey.py index e3f6c5804c..1f75616874 100644 --- a/pilot/helpers/agents/test_CodeMonkey.py +++ b/pilot/helpers/agents/test_CodeMonkey.py @@ -54,12 +54,12 @@ class TestCodeMonkey: convo = MagicMock() mock_responses = [ # [], - [{ + {'files': [{ 'content': 'Washington', 'description': "A new .txt file with the word 'Washington' in it.", 'name': 'washington.txt', 'path': 'washington.txt' - }] + }]} ] convo.send_message.side_effect = mock_responses @@ -94,12 +94,12 @@ class TestCodeMonkey: convo = MagicMock() mock_responses = [ # ['file_to_read.txt', 'output.txt'], - [{ + {'files': [{ 'content': 'Hello World!\n', 'description': 'This file is the output file. The content of file_to_read.txt is copied into this file.', 'name': 'output.txt', 'path': 'output.txt' - }] + }]} ] convo.send_message.side_effect = mock_responses diff --git a/pilot/utils/test_function_calling.py b/pilot/utils/test_function_calling.py index bffa7d0bc8..9d4b4ff8e3 100644 --- a/pilot/utils/test_function_calling.py +++ b/pilot/utils/test_function_calling.py @@ -23,7 +23,7 @@ class TestFunctionCalling: response = parse_agent_response(response, function_calls) # Then - assert response == 'Hello world!' + assert response == {'greeting': 'Hello world!'} def test_parse_agent_response_json_markdown(self): # Given @@ -35,7 +35,7 @@ class TestFunctionCalling: response = parse_agent_response(response, function_calls) # Then - assert response == 'Hello world!' + assert response == {'greeting': 'Hello world!'} def test_parse_agent_response_markdown(self): # Given @@ -47,7 +47,7 @@ class TestFunctionCalling: response = parse_agent_response(response, function_calls) # Then - assert response == 'Hello world!' + assert response == {'greeting': 'Hello world!'} def test_parse_agent_response_multiple_args(self): # Given @@ -55,11 +55,11 @@ class TestFunctionCalling: function_calls = {'definitions': [], 'functions': {}} # When - greeting, name = parse_agent_response(response, function_calls) + response = parse_agent_response(response, function_calls) # Then - assert greeting == 'Hello' - assert name == 'John' + assert response['greeting'] == 'Hello' + assert response['name'] == 'John' def test_json_prompter():