Description
For function calling, OpenAI/Azure OpenAI support tool choice allowed_tools, allowing you to restrict the tools that the model is allowed to call, without modifying the list of tools supplied to the model, to benefit from prompt caching.
https://developers.openai.com/api/docs/guides/function-calling#additional-configurations
"tool_choice": {
"type": "allowed_tools",
"mode": "auto",
"tools": [
{ "type": "function", "name": "get_weather" },
{ "type": "function", "name": "search_docs" }
]
}
Could this be supported in the Agent Framework?
Code Sample
await agent.run(
"What is 2 + 2?",
options={
"tool_choice": {
"mode": "auto",
"allowed_tools": ["add_numbers"],
},
}
)
Language/SDK
Python
Description
For function calling, OpenAI/Azure OpenAI support tool choice
allowed_tools, allowing you to restrict the tools that the model is allowed to call, without modifying the list of tools supplied to the model, to benefit from prompt caching.https://developers.openai.com/api/docs/guides/function-calling#additional-configurations
Could this be supported in the Agent Framework?
Code Sample
Language/SDK
Python