OpenAI GPT API 2023-08-01-preview error "Functions are not supported at this time."

Bryce Philbert Salvador 20 Reputation points
2023-10-30T20:41:41.76+00:00

I'm getting "Functions are not supported at this time." when using openai.ChatCompletion.create . I'm also using Cognitive Search and intend to use the function call to properly format my result from the prompts. GPT version is GPT4-32k 0613 and API version is 2023-08-01-preview. Documentation from azure states that 2023-07-01-preview is supported but I tried using that and it still says the same thing. Any help would be greatly appreciated, thank you.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,423 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 29,811 Reputation points
    2023-10-31T07:23:47.7033333+00:00

    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.