File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
articles/ai-services/openai/how-to Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -214,11 +214,7 @@ from openai import AzureOpenAI
214
214
215
215
token_provider = get_bearer_token_provider(DefaultAzureCredential(), " https://cognitiveservices.azure.com/.default" )
216
216
217
- # may change in the future
218
- # https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning
219
- api_version = " 2023-07-01-preview"
220
-
221
- # https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource
217
+ api_version = " 2023-10-01-preview"
222
218
endpoint = " https://my-resource.openai.azure.com"
223
219
224
220
client = AzureOpenAI(
@@ -228,7 +224,7 @@ client = AzureOpenAI(
228
224
)
229
225
230
226
completion = client.chat.completions.create(
231
- model = " deployment-name" , # e.g. gpt-35-instant
227
+ model = " deployment-name" , # gpt-35-instant
232
228
messages = [
233
229
{
234
230
" role" : " user" ,
You can’t perform that action at this time.
0 commit comments