Bryce Philbert Salvador Greetings!
Documentation from azure states that 2023-07-01-preview is supported but I tried using that and it still says the same thing.
Are you referring to this documentation How to use function calling with Azure OpenAI Service (Preview)?
Your understanding is correct. Function calling is available in the 2023-07-01-preview
API version and works with version 0613 of gpt-35-turbo, gpt-35-turbo-16k, gpt-4, and gpt-4-32k.
Can you confirm if you are following the same steps as discussed in above doc? Ensure that you are using the correct syntax and format for the prompts.
To use function calling with the Chat Completions API, you need to include two new properties in your request: functions
and function_call
. You can include one or more functions
in your request and you can learn more about how to define functions in the defining functions section below. Keep in mind that functions are injected into the system message under the hood so functions count against your token usage.
When functions are provided, by default the function_call
will be set to "auto"
and the model will decide whether or not a function should be called. Alternatively, you can set the function_call
parameter to {"name": "<insert-function-name>"}
to force the API to call a specific function or you can set the parameter to "none"
to prevent the model from calling any functions.
Let me know if that helps or have any further queries.