Gpt-35-turbo 0301 and 2023-09-15-preview support

Shafeeq Niyas 40 Reputation points

i am using Gpt-35-turbo 0301 and 2023-09-15-preview in azure open ai ,When I try to connect using this code, I get a message that the API isn't supported

import openai

# Set your Azure OpenAI credentials
client = OpenAI(api_key = "", base_url="h/")

# Now you can make calls to the OpenAI API using these credentials
response =
      "role": "system",
      "content": "Given the following SQL tables, your job is to write queries given a user’s request."
      "role": "user",
      "content": "Write a SQL query which computes the average total order value for all orders on 2023-04-01."

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

Accepted answer
  1. Charlie Wei 1,895 Reputation points

    Hello Shafeeq Niyas,

    I believe you are currently utilizing OpenAI rather than Azure OpenAI. Please consider modifying the initial part of the code as follows. Additionally, it is advisable to consult the Quickstart provided.

    import os
    from openai import AzureOpenAI
    client = AzureOpenAI(
      azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"), 

    Best regards,

    If you find my response helpful, please consider accepting this answer and voting 'yes' to support the community. Thank you!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful