according to the latest api_version available on Azure 2024-04-01. tool_choice is not supporting required option.
any idea when it will be available?
4 Likes
Facing the same issue here ![]()
Openai offers two ways to customize the default behavior depending on your use case:
- To force the model to always call one or more tools, you can set
tool_choice: "required". The model will then select which tool to call. AzureOpenAI doesn’t support this method. - To force the model to call only one specific function, you can set
tool_choice: {"type": "file_search"}.
Use the second way, it worked for me.