Gpt-35-turbo 0301 and 2023-09-15-preview support client.chat.completions.create

Shafeeq Niyas 60 Reputation points
2024-03-12T18:41:45.3366667+00:00

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 = client.chat.completions.create(
  model="gpt-35-turbo",
  messages=[
    {
      "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."
    }
  ],
  temperature=0.7,
  max_tokens=64,
  top_p=1
)


Azure OpenAI in Foundry Models
0 comments No comments

1 answer

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    3 deleted comments

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.