skip to Main Content

Why do I get the error "Unrecognized request argument supplied: functions" when using `functions` when calling Azure OpenAI GPT?

I'm trying to use functions when calling Azure OpenAI GPT, as documented in https://platform.openai.com/docs/api-reference/chat/create#chat/create-functions I use: import openai openai.api_type = "azure" openai.api_base = "https://XXXXXXXX.openai.azure.com/" openai.api_version = "2023-06-01-preview" openai.api_key = os.getenv("OPENAI_API_KEY") response = openai.ChatCompletion.create( engine="gpt-35-turbo-XXX", model="gpt-35-turbo-0613-XXXX" messages=messages, functions=functions, function_call="auto", ) but…

VIEW QUESTION

what should I do to make the azure openai return stream events with java 11

I am using this code to return a stream response when using azure openai api: public void getChatCompletion(SseEmitter emitter, String prompt, String azureOpenaiKey) { String endpoint = "https://xxxx.openai.azure.com/"; String deploymentOrModelId = "xxx-ai"; OpenAIClient client = new OpenAIClientBuilder() .endpoint(endpoint) .credential(new AzureKeyCredential(azureOpenaiKey))…

VIEW QUESTION
Back To Top
Search