A programming framework for agentic AI
FIX:simple fix on tool calling test for anthropic (#6181)
EeSd7f2b56846ae
diff --git a/python/packages/autogen-ext/tests/models/test_openai_model_client.py b/python/packages/autogen-ext/tests/models/test_openai_model_client.pyindex 32506cbb1..97edb4dab 100644--- a/python/packages/autogen-ext/tests/models/test_openai_model_client.py+++ b/python/packages/autogen-ext/tests/models/test_openai_model_client.py@@ -1644,7 +1644,9 @@ async def test_model_client_with_function_calling(model: str, openai_client: Ope# Test tool callingpass_tool = FunctionTool(_pass_function, name="pass_tool", description="pass session.")fail_tool = FunctionTool(_fail_function, name="fail_tool", description="fail session.")- messages: List[LLMMessage] = [UserMessage(content="Call the pass tool with input 'task'", source="user")]+ messages: List[LLMMessage] = [+ UserMessage(content="Call the pass tool with input 'task' and talk result", source="user")+ ]create_result = await openai_client.create(messages=messages, tools=[pass_tool, fail_tool])assert isinstance(create_result.content, list)assert len(create_result.content) == 1@@ -1675,7 +1677,8 @@ async def test_model_client_with_function_calling(model: str, openai_client: Ope# Test parallel tool callingmessages = [UserMessage(- content="Call both the pass tool with input 'task' and the fail tool also with input 'task'", source="user"+ content="Call both the pass tool with input 'task' and the fail tool also with input 'task' and talk result",+ source="user",)]create_result = await openai_client.create(messages=messages, tools=[pass_tool, fail_tool])