File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
articles/ai-services/openai/includes Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ author: mrbullwinkle #travisw
5
5
ms.author : mbullwin # travisw
6
6
ms.service : azure-ai-openai
7
7
ms.topic : include
8
- ms.date : 03/07/2024
8
+ ms.date : 01/10/2025
9
9
---
10
10
11
11
[ !INCLUDE [ Set up required variables] ( ./use-your-data-common-variables.md )]
@@ -59,7 +59,7 @@ deployment = os.environ.get("AZURE_OPENAI_DEPLOYMENT_ID")
59
59
client = openai.AzureOpenAI(
60
60
azure_endpoint = endpoint,
61
61
api_key = api_key,
62
- api_version = " 2024-02-01 " ,
62
+ api_version = " 2024-10-21 " ,
63
63
)
64
64
65
65
completion = client.chat.completions.create(
@@ -87,7 +87,8 @@ completion = client.chat.completions.create(
87
87
}
88
88
)
89
89
90
- print (completion.model_dump_json(indent = 2 ))
90
+ print (f " { completion.choices[0 ].message.role} : { completion.choices[0 ].message.content} " )
91
+
91
92
```
92
93
93
94
# [ OpenAI Python 0.28.1] ( #tab/python )
You can’t perform that action at this time.
0 commit comments