You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you searched for related issues? Others may have had similar requesrs yes
Question
Currently, when using an agent, tool functions decorated with @function_tool are automatically invoked. I have a specific requirement where I need to send the function call details to a third-party system for execution. After receiving the results from the third party, I want to manually add these results to the messages list.
Steps to Reproduce:
Define a tool function using the @function_tool decorator.
Run the agent using Runner.run_streamed with a prompt that triggers the tool function.
Observe that the tool function is automatically called.
Expected Behavior:
A configuration option or method to disable automatic tool calls so that the function call information is exposed to the user instead of being automatically executed.
The user should then be able to send this information to a third-party system for execution, receive the result, and manually insert the result back into the message flow.
Proposed Solution:
Provide a configuration option in the agent setup to disable automatic tool execution.
Alternatively, allow the agent to output the tool call details as part of its response, letting the user decide when to execute the tool function and how to handle the results.
The text was updated successfully, but these errors were encountered:
In general, the model expects that if it sends you a tool call, the input on the next turn has the results for the tool call. So you'd definitely need to add the responses.
You could directly create a FunctionTool instead of using the decorator. For example:
Please read this first
Question
Currently, when using an agent, tool functions decorated with @function_tool are automatically invoked. I have a specific requirement where I need to send the function call details to a third-party system for execution. After receiving the results from the third party, I want to manually add these results to the messages list.
Steps to Reproduce:
Define a tool function using the @function_tool decorator.
Run the agent using Runner.run_streamed with a prompt that triggers the tool function.
Observe that the tool function is automatically called.
Expected Behavior:
A configuration option or method to disable automatic tool calls so that the function call information is exposed to the user instead of being automatically executed.
The user should then be able to send this information to a third-party system for execution, receive the result, and manually insert the result back into the message flow.
Proposed Solution:
Provide a configuration option in the agent setup to disable automatic tool execution.
Alternatively, allow the agent to output the tool call details as part of its response, letting the user decide when to execute the tool function and how to handle the results.
The text was updated successfully, but these errors were encountered: