Hello @Milne, Cameron , Thanks for using Microsoft Q&A Platform.
May I know the version you are using for the gpt-35-turbo model?
Version 0613 and all future versions of gpt-35-turbo will only be made available in the /chat/completions API.
Please visit this to know more: How to work with the GPT-35-Turbo and GPT-4 models - Azure OpenAI Service | Microsoft Learn
Here is the code for the reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions#working-with-the-gpt-35-turbo-and-gpt-4-models
import os
import openai
openai.api_type = "azure"
openai.api_version = "2023-05-15"
openai.api_base = os.getenv("OPENAI_API_BASE") # Your Azure OpenAI resource's endpoint value.
openai.api_key = os.getenv("OPENAI_API_KEY")
response = openai.ChatCompletion.create(
engine="gpt-35-turbo", # The deployment name you chose when you deployed the GPT-35-Turbo or GPT-4 model.
messages=[
{"role": "system", "content": "Assistant is a large language model trained by OpenAI."},
{"role": "user", "content": "Who were the founders of Microsoft?"}
]
)
print(response)
print(response['choices'][0]['message']['content'])
I hope this helps.
Regards,
Vasavi
-Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.