Skip to content

Commit 879a0e5

Browse files
authored
Merge pull request #267085 from MicrosoftDocs/main
Publish to live, Friday 4 AM PST, 2/23
2 parents 4b38657 + 9131496 commit 879a0e5

File tree

504 files changed

+1322
-3554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

504 files changed

+1322
-3554
lines changed

articles/ai-services/openai/assistants-reference-messages.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ A [message](#message-object) object.
5151
from openai import AzureOpenAI
5252

5353
client = AzureOpenAI(
54-
api_key=os.getenv("AZURE_OPENAI_KEY"),
54+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
5555
api_version="2024-02-15-preview",
5656
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
5757
)
@@ -68,7 +68,7 @@ print(thread_message)
6868

6969
```console
7070
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview \
71-
-H "api-key: $AZURE_OPENAI_KEY" \
71+
-H "api-key: $AZURE_OPENAI_API_KEY" \
7272
-H 'Content-Type: application/json' \
7373
-d '{
7474
"role": "user",
@@ -114,7 +114,7 @@ A list of [message](#message-object) objects.
114114
from openai import AzureOpenAI
115115

116116
client = AzureOpenAI(
117-
api_key=os.getenv("AZURE_OPENAI_KEY"),
117+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
118118
api_version="2024-02-15-preview",
119119
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
120120
)
@@ -128,7 +128,7 @@ print(thread_messages.data)
128128

129129
```console
130130
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview \
131-
-H "api-key: $AZURE_OPENAI_KEY" \
131+
-H "api-key: $AZURE_OPENAI_API_KEY" \
132132
-H 'Content-Type: application/json'
133133
```
134134

@@ -168,7 +168,7 @@ A list of [message file](#message-file-object) objects
168168
from openai import AzureOpenAI
169169

170170
client = AzureOpenAI(
171-
api_key=os.getenv("AZURE_OPENAI_KEY"),
171+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
172172
api_version="2024-02-15-preview",
173173
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
174174
)
@@ -185,7 +185,7 @@ print(message_files)
185185

186186
```console
187187
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/files?api-version=2024-02-15-preview \
188-
-H "api-key: $AZURE_OPENAI_KEY" \
188+
-H "api-key: $AZURE_OPENAI_API_KEY" \
189189
-H 'Content-Type: application/json'
190190
```
191191

@@ -219,7 +219,7 @@ The [message](#message-object) object matching the specified ID.
219219
from openai import AzureOpenAI
220220

221221
client = AzureOpenAI(
222-
api_key=os.getenv("AZURE_OPENAI_KEY"),
222+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
223223
api_version="2024-02-15-preview",
224224
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
225225
)
@@ -236,7 +236,7 @@ print(message)
236236

237237
```console
238238
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-02-15-preview \
239-
-H "api-key: $AZURE_OPENAI_KEY" \
239+
-H "api-key: $AZURE_OPENAI_API_KEY" \
240240
-H 'Content-Type: application/json'
241241
```
242242

@@ -270,7 +270,7 @@ The [message file](#message-file-object) object.
270270
from openai import AzureOpenAI
271271

272272
client = AzureOpenAI(
273-
api_key=os.getenv("AZURE_OPENAI_KEY"),
273+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
274274
api_version="2024-02-15-preview",
275275
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
276276
)
@@ -288,7 +288,7 @@ print(message_files)
288288
```console
289289
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}/files/{file_id}?api-version=2024-02-15-preview
290290
``` \
291-
-H "api-key: $AZURE_OPENAI_KEY" \
291+
-H "api-key: $AZURE_OPENAI_API_KEY" \
292292
-H 'Content-Type: application/json'
293293
```
294294

@@ -325,7 +325,7 @@ The modified [message](#message-object) object.
325325
from openai import AzureOpenAI
326326

327327
client = AzureOpenAI(
328-
api_key=os.getenv("AZURE_OPENAI_KEY"),
328+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
329329
api_version="2024-02-15-preview",
330330
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
331331
)
@@ -346,7 +346,7 @@ print(message)
346346
```console
347347
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages/{message_id}?api-version=2024-02-15-preview
348348
``` \
349-
-H "api-key: $AZURE_OPENAI_KEY" \
349+
-H "api-key: $AZURE_OPENAI_API_KEY" \
350350
-H 'Content-Type: application/json' \
351351
-d '{
352352
"metadata": {

articles/ai-services/openai/assistants-reference-runs.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ A run object.
5252
from openai import AzureOpenAI
5353

5454
client = AzureOpenAI(
55-
api_key=os.getenv("AZURE_OPENAI_KEY"),
55+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
5656
api_version="2024-02-15-preview",
5757
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
5858
)
@@ -68,7 +68,7 @@ print(run)
6868

6969
```console
7070
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs?api-version=2024-02-15-preview \
71-
-H "api-key: $AZURE_OPENAI_KEY" \
71+
-H "api-key: $AZURE_OPENAI_API_KEY" \
7272
-H 'Content-Type: application/json' \
7373
-d '{
7474
"assistant_id": "asst_abc123"
@@ -108,7 +108,7 @@ A run object.
108108
from openai import AzureOpenAI
109109

110110
client = AzureOpenAI(
111-
api_key=os.getenv("AZURE_OPENAI_KEY"),
111+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
112112
api_version="2024-02-15-preview",
113113
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
114114
)
@@ -127,7 +127,7 @@ run = client.beta.threads.create_and_run(
127127

128128
```console
129129
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/runs?api-version=2024-02-15-preview \
130-
-H "api-key: $AZURE_OPENAI_KEY" \
130+
-H "api-key: $AZURE_OPENAI_API_KEY" \
131131
-H 'Content-Type: application/json' \
132132
-d '{
133133
"assistant_id": "asst_abc123",
@@ -176,7 +176,7 @@ A list of [run](#run-object) objects.
176176
from openai import AzureOpenAI
177177

178178
client = AzureOpenAI(
179-
api_key=os.getenv("AZURE_OPENAI_KEY"),
179+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
180180
api_version="2024-02-15-preview",
181181
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
182182
)
@@ -191,7 +191,7 @@ print(runs)
191191

192192
```console
193193
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs?api-version=2024-02-15-preview \
194-
-H "api-key: $AZURE_OPENAI_KEY" \
194+
-H "api-key: $AZURE_OPENAI_API_KEY" \
195195
-H 'Content-Type: application/json'
196196
```
197197

@@ -233,7 +233,7 @@ A list of [run step](#run-step-object) objects.
233233
from openai import AzureOpenAI
234234

235235
client = AzureOpenAI(
236-
api_key=os.getenv("AZURE_OPENAI_KEY"),
236+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
237237
api_version="2024-02-15-preview",
238238
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
239239
)
@@ -249,7 +249,7 @@ print(run_steps)
249249

250250
```console
251251
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}/steps?api-version=2024-02-15-preview \
252-
-H "api-key: $AZURE_OPENAI_KEY" \
252+
-H "api-key: $AZURE_OPENAI_API_KEY" \
253253
-H 'Content-Type: application/json'
254254
```
255255

@@ -282,7 +282,7 @@ The [run](#run-object) object matching the specified run ID.
282282
from openai import AzureOpenAI
283283

284284
client = AzureOpenAI(
285-
api_key=os.getenv("AZURE_OPENAI_KEY"),
285+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
286286
api_version="2024-02-15-preview",
287287
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
288288
)
@@ -298,7 +298,7 @@ print(run)
298298

299299
```console
300300
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}?api-version=2024-02-15-preview \
301-
-H "api-key: $AZURE_OPENAI_KEY" \
301+
-H "api-key: $AZURE_OPENAI_API_KEY" \
302302
-H 'Content-Type: application/json'
303303
```
304304

@@ -332,7 +332,7 @@ The [run step](#run-step-object) object matching the specified ID.
332332
from openai import AzureOpenAI
333333

334334
client = AzureOpenAI(
335-
api_key=os.getenv("AZURE_OPENAI_KEY"),
335+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
336336
api_version="2024-02-15-preview",
337337
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
338338
)
@@ -349,7 +349,7 @@ print(run_step)
349349

350350
```console
351351
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}/steps/{step_id}?api-version=2024-02-15-preview \
352-
-H "api-key: $AZURE_OPENAI_KEY" \
352+
-H "api-key: $AZURE_OPENAI_API_KEY" \
353353
-H 'Content-Type: application/json'
354354
```
355355

@@ -388,7 +388,7 @@ The modified [run](#run-object) object matching the specified ID.
388388
from openai import AzureOpenAI
389389

390390
client = AzureOpenAI(
391-
api_key=os.getenv("AZURE_OPENAI_KEY"),
391+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
392392
api_version="2024-02-15-preview",
393393
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
394394
)
@@ -405,7 +405,7 @@ print(run)
405405

406406
```console
407407
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}?api-version=2024-02-15-preview \
408-
-H "api-key: $AZURE_OPENAI_KEY" \
408+
-H "api-key: $AZURE_OPENAI_API_KEY" \
409409
-H 'Content-Type: application/json'
410410
-d '{
411411
"metadata": {
@@ -449,7 +449,7 @@ The modified [run](#run-object) object matching the specified ID.
449449
from openai import AzureOpenAI
450450

451451
client = AzureOpenAI(
452-
api_key=os.getenv("AZURE_OPENAI_KEY"),
452+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
453453
api_version="2024-02-15-preview",
454454
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
455455
)
@@ -471,7 +471,7 @@ print(run)
471471

472472
```console
473473
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}/submit_tool_outputs?api-version=2024-02-15-preview \
474-
-H "api-key: $AZURE_OPENAI_KEY" \
474+
-H "api-key: $AZURE_OPENAI_API_KEY" \
475475
-H 'Content-Type: application/json' \
476476
-d '{
477477
"tool_outputs": [
@@ -513,7 +513,7 @@ The modified [run](#run-object) object matching the specified ID.
513513
from openai import AzureOpenAI
514514

515515
client = AzureOpenAI(
516-
api_key=os.getenv("AZURE_OPENAI_KEY"),
516+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
517517
api_version="2024-02-15-preview",
518518
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
519519
)
@@ -529,7 +529,7 @@ print(run)
529529

530530
```console
531531
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}/cancel?api-version=2024-02-15-preview \
532-
-H "api-key: $AZURE_OPENAI_KEY" \
532+
-H "api-key: $AZURE_OPENAI_API_KEY" \
533533
-H 'Content-Type: application/json' \
534534
-X POST
535535
```

articles/ai-services/openai/assistants-reference-threads.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ A [thread object](#thread-object).
4343
from openai import AzureOpenAI
4444

4545
client = AzureOpenAI(
46-
api_key=os.getenv("AZURE_OPENAI_KEY"),
46+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
4747
api_version="2024-02-15-preview",
4848
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
4949
)
@@ -56,7 +56,7 @@ print(empty_thread)
5656

5757
```console
5858
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads?api-version=2024-02-15-preview \
59-
-H "api-key: $AZURE_OPENAI_KEY" \
59+
-H "api-key: $AZURE_OPENAI_API_KEY" \
6060
-H 'Content-Type: application/json' \
6161
-d ''
6262
```
@@ -90,7 +90,7 @@ The thread object matching the specified ID.
9090
from openai import AzureOpenAI
9191

9292
client = AzureOpenAI(
93-
api_key=os.getenv("AZURE_OPENAI_KEY"),
93+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
9494
api_version="2024-02-15-preview",
9595
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
9696
)
@@ -103,7 +103,7 @@ print(my_thread)
103103

104104
```console
105105
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}?api-version=2024-02-15-preview \
106-
-H "api-key: $AZURE_OPENAI_KEY" \
106+
-H "api-key: $AZURE_OPENAI_API_KEY" \
107107
-H 'Content-Type: application/json'
108108
```
109109

@@ -141,7 +141,7 @@ The modified [thread object](#thread-object) matching the specified ID.
141141
from openai import AzureOpenAI
142142

143143
client = AzureOpenAI(
144-
api_key=os.getenv("AZURE_OPENAI_KEY"),
144+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
145145
api_version="2024-02-15-preview",
146146
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
147147
)
@@ -160,7 +160,7 @@ print(my_updated_thread)
160160

161161
```console
162162
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}?api-version=2024-02-15-preview \
163-
-H "api-key: $AZURE_OPENAI_KEY" \
163+
-H "api-key: $AZURE_OPENAI_API_KEY" \
164164
-H 'Content-Type: application/json' \
165165
-d '{
166166
"metadata": {
@@ -198,7 +198,7 @@ Deletion status.
198198
from openai import AzureOpenAI
199199

200200
client = AzureOpenAI(
201-
api_key=os.getenv("AZURE_OPENAI_KEY"),
201+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
202202
api_version="2024-02-15-preview",
203203
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
204204
)
@@ -211,7 +211,7 @@ print(response)
211211

212212
```console
213213
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}?api-version=2024-02-15-preview \
214-
-H "api-key: $AZURE_OPENAI_KEY" \
214+
-H "api-key: $AZURE_OPENAI_API_KEY" \
215215
-H 'Content-Type: application/json' \
216216
-X DELETE
217217
```

0 commit comments

Comments
 (0)