it can actually return both content and tool_calls at the same time but it is unpredictable. if you want to force the api to include some text message together when a tool is invoked, you can add such property (e.g. preprocessingMessage) in your tool definition. so you can now send it to display in the UI before/while you execute the tool action.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Tool_choice = auto sending content and tool_calls | 16 | 347 | April 3, 2025 | |
Partially structured output? Free text output, but force correct tool call JSON | 9 | 863 | October 8, 2024 | |
Chat_completion with function calling | 3 | 1536 | May 22, 2024 | |
Function Calling Help - Model Doesn't Seem To Accept Function Prompt? | 14 | 4140 | February 10, 2024 | |
Getting tool_calls and content back from same API call | 4 | 822 | November 26, 2024 |