Skip to content

Commit 4512b3a

Browse files
committed
update
1 parent 5b5c991 commit 4512b3a

File tree

1 file changed

+15
-16
lines changed
  • articles/ai-foundry/openai/includes/language-overview

1 file changed

+15
-16
lines changed

articles/ai-foundry/openai/includes/language-overview/python.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,6 @@ pip install openai --upgrade
3232

3333
## Authentication
3434

35-
# [API Key](#tab/python-key)
36-
37-
[!INCLUDE [Azure key vault](~/reusable-content/ce-skilling/azure/includes/ai-services/security/azure-key-vault.md)]
38-
39-
```python
40-
import os
41-
from openai import OpenAI
42-
43-
client = OpenAI(
44-
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
45-
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/"
46-
)
47-
48-
```
49-
50-
5135
# [Microsoft Entra ID](#tab/python-secure)
5236

5337
```python
@@ -71,6 +55,21 @@ response = client.responses.create(
7155
print(response.model_dump_json(indent=2))
7256
```
7357

58+
# [API Key](#tab/python-key)
59+
60+
[!INCLUDE [Azure key vault](~/reusable-content/ce-skilling/azure/includes/ai-services/security/azure-key-vault.md)]
61+
62+
```python
63+
import os
64+
from openai import OpenAI
65+
66+
client = OpenAI(
67+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
68+
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/"
69+
)
70+
71+
```
72+
7473

7574
---
7675

0 commit comments

Comments
 (0)