creamy-match-85520
08/06/2025, 4:18 AMtall-airline-16756
08/06/2025, 4:18 AMtall-airline-16756
08/06/2025, 4:18 AM@function_tool() and registered in the agent's context.
• LLM Response Format: If the LLM generates the function name as plain text instead of a callable format, the agent will treat it as text to be spoken.
• Tool Registration: Verify that the tool is correctly registered and recognized by the agent.
To resolve this, check that:
1. All functions are defined with @function_tool().
2. The LLM is configured to generate function calls in the correct format.
3. The tools are properly registered in the agent's context.
Let me know if you need further assistance with any of these steps.
Sources: tests/test_evals.pycreamy-match-85520
08/06/2025, 4:19 AMtall-airline-16756
08/06/2025, 4:20 AMtool_calls array with the tool’s name, arguments, and sometimes an id. Here’s an example to make it clearer:
{
"tool_calls": [
{
"function": {
"name": "special_function",
"arguments": "{\"arg1\": 1}",
"id": "123456789"
}
}
]
}
• Verify Tool Registration: Make sure your tools are registered with their schema definitions in JSON format. The schema should include the tool’s name, description, and parameters. Check out this example:
{
"type": "function",
"function": {
"name": "special_function",
"description": "I'm special",
"parameters": {
"type": "object",
"properties": {
"arg1": {
"type": "integer",
"description": "The arg."
}
},
"required": [
"arg1"
]
}
}
}
• Testing: Try running some test cases to confirm tool registration and response parsing are working smoothly. For example, send a request to execute a tool and check that the response includes the right tool call with the expected arguments.
If you want, I’m here to help guide you through any part of this—just let me know!