You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/assistants-reference-messages.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Azure OpenAI Service Assistants Python & REST API messages reference
3
3
titleSuffix: Azure OpenAI
4
-
description: Learn how to use Azure OpenAI's Python & REST API messages with Assistants
4
+
description: Learn how to use Azure OpenAI's Python & REST API messages with Assistants.
5
5
manager: nitinme
6
6
ms.service: azure-ai-openai
7
7
ms.topic: conceptual
@@ -37,11 +37,11 @@ Create a message.
37
37
|`role`| string | Required | The role of the entity that is creating the message. Currently only user is supported.|
38
38
|`content`| string | Required | The content of the message. |
39
39
|`file_ids`| array | Optional | A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like retrieval and code_interpreter that can access and use files. |
40
-
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. |
40
+
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview
86
85
```
@@ -105,7 +104,7 @@ Returns a list of messages for a given thread.
105
104
106
105
### Returns
107
106
108
-
A list of message objects.
107
+
A list of [message](#message-object) objects.
109
108
110
109
### Example list messages request
111
110
@@ -159,7 +158,7 @@ Returns a list of message files.
159
158
160
159
### Returns
161
160
162
-
A list of message file objects
161
+
A list of [message file](#message-file-object) objects
163
162
164
163
### Example list message files request
165
164
@@ -210,7 +209,7 @@ Retrieves a message file.
210
209
211
210
### Returns
212
211
213
-
The message file object.
212
+
The [message file](#message-file-object) object.
214
213
215
214
### Example retrieve message request
216
215
@@ -255,13 +254,13 @@ Retrieves a message file.
255
254
256
255
|Parameter| Type | Required | Description |
257
256
|---|---|---|---|
258
-
|`thread_id`| string | Required | The ID of the thread which the message and file belongs to. |
257
+
|`thread_id`| string | Required | The ID of the thread, which the message and file belongs to. |
259
258
|`message_id`| string | Required | The ID of the message that the file belongs to. |
260
259
|`file_id`| string | Required | The ID of the file being retrieved. |
261
260
262
261
**Returns**
263
262
264
-
The message file object.
263
+
The [message file](#message-file-object) object.
265
264
266
265
### Example retrieve message file request
267
266
@@ -314,7 +313,7 @@ Modifies a message.
314
313
315
314
|Parameter| Type | Required | Description |
316
315
|---|---|---|---|
317
-
| metadata | map| Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.|
316
+
| metadata | map| Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.|
318
317
319
318
### Returns
320
319
@@ -375,16 +374,15 @@ Represents a message within a thread.
375
374
|`assistant_id`| string or null |If applicable, the ID of the assistant that authored this message.|
376
375
|`run_id`| string or null |If applicable, the ID of the run associated with the authoring of this message.|
377
376
|`file_ids`| array |A list of file IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message.|
378
-
|`metadata`| map |Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.|
377
+
|`metadata`| map |Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.|
379
378
380
379
## Message file object
381
380
382
-
A list of files attached to a `message`
381
+
A list of files attached to a message.
383
382
384
383
|Name | Type | Description |
385
384
|--- |--- |--- |
386
385
|`id`| string | The identifier, which can be referenced in API endpoints.|
387
386
|`object`|string| The object type, which is always `thread.message.file`.|
388
387
|`created_at`|integer | The Unix timestamp (in seconds) for when the message file was created.|
389
-
|`message_id`| string | The ID of the message that the File is attached to.|
390
-
388
+
|`message_id`| string | The ID of the message that the File is attached to.|
Copy file name to clipboardExpand all lines: articles/ai-services/openai/assistants-reference-runs.md
+21-17Lines changed: 21 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Azure OpenAI Service Assistants Python & REST API runs reference
3
3
titleSuffix: Azure OpenAI
4
-
description: Learn how to use Azure OpenAI's Python & REST API runs with Assistants
4
+
description: Learn how to use Azure OpenAI's Python & REST API runs with Assistants.
5
5
manager: nitinme
6
6
ms.service: azure-ai-openai
7
7
ms.topic: conceptual
@@ -35,11 +35,11 @@ Create a run.
35
35
|Name | Type | Required | Description |
36
36
|--- |--- |--- |--- |
37
37
|`assistant_id`| string | Required | The ID of the assistant to use to execute this run. |
38
-
|`model`| string or null | Optional | The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. |
38
+
|`model`| string or null | Optional | The model deployment name to be used to execute this run. If a value is provided here, it will override the model deployment name associated with the assistant. If not, the model deployment name associated with the assistant will be used. |
39
39
|`instructions`| string or null | Optional | Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis. |
40
40
|`additional_instructions`| string or null | Optional | Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. |
41
41
|`tools`| array or null | Optional | Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. |
42
-
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. |
42
+
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
43
43
44
44
### Returns
45
45
@@ -92,7 +92,7 @@ Create a thread and run it in a single request.
92
92
|--- |--- |--- |--- |
93
93
|`assistant_id`| string | Required | The ID of the assistant to use to execute this run.|
94
94
|`thread`| object | Optional ||
95
-
|`model`| string or null | Optional | The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.|
95
+
|`model`| string or null | Optional | The ID of the Model deployment name to be used to execute this run. If a value is provided here, it will override the model deployment name associated with the assistant. If not, the model deployment name associated with the assistant will be used.|
96
96
|`instructions`| string or null | Optional | Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.|
97
97
|`tools`| array or null | Optional | Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.|
98
98
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.|
@@ -167,7 +167,7 @@ Returns a list of runs belonging to a thread.
167
167
168
168
### Returns
169
169
170
-
A list of run objects.
170
+
A list of [run](#run-object) objects.
171
171
172
172
### Example list runs request
173
173
@@ -224,7 +224,7 @@ Returns a list of steps belonging to a run.
224
224
225
225
### Returns
226
226
227
-
A list of run step objects.
227
+
A list of [run step](#run-step-object) objects.
228
228
229
229
### Example list run steps request
230
230
@@ -273,7 +273,7 @@ Retrieves a run.
273
273
274
274
### Returns
275
275
276
-
The run object matching the specified run ID.
276
+
The [run](#run-object) object matching the specified run ID.
277
277
278
278
### Example list run steps request
279
279
@@ -323,7 +323,7 @@ Retrieves a run step.
323
323
324
324
### Returns
325
325
326
-
The run step object matching the specified ID.
326
+
The [run step](#run-step-object) object matching the specified ID.
327
327
328
328
### Example retrieve run steps request
329
329
@@ -377,6 +377,10 @@ Modifies a run.
377
377
|--- |--- |--- |--- |
378
378
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.|
379
379
380
+
### Returns
381
+
382
+
The modified [run](#run-object) object matching the specified ID.
383
+
380
384
### Example modify run request
381
385
382
386
# [Python 1.x](#tab/python)
@@ -432,11 +436,11 @@ When a run has the status: "requires_action" and required_action.type is submit_
432
436
433
437
|Name | Type | Required | Description |
434
438
|--- |--- |--- |--- |
435
-
| `tool_outputs | array | Required ||
439
+
| `tool_outputs | array | Required |A list of tools for which the outputs are being submitted. |
436
440
437
441
### Returns
438
442
439
-
The modified run object matching the specified ID.
443
+
The modified [run](#run-object) object matching the specified ID.
440
444
441
445
### Example submit tool outputs to run request
442
446
@@ -500,7 +504,7 @@ Cancels a run that is in_progress.
500
504
501
505
### Returns
502
506
503
-
The modified run object matching the specified ID.
507
+
The modified [run](#run-object) object matching the specified ID.
504
508
505
509
### Example submit tool outputs to run request
506
510
@@ -544,20 +548,20 @@ Represents an execution run on a thread.
544
548
|`created_at`| integer | The Unix timestamp (in seconds) for when the run was created.|
545
549
|`thread_id`| string | The ID of the thread that was executed on as a part of this run.|
546
550
|`assistant_id`| string | The ID of the assistant used for execution of this run.|
547
-
|`status`| string | The status of the run, which can be either queued, in_progress, requires_action, cancelling, cancelled, failed, completed, or expired.|
551
+
|`status`| string | The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.|
548
552
|`required_action`| object or null | Details on the action required to continue the run. Will be null if no action is required.|
549
553
|`last_error`| object or null | The last error associated with this run. Will be null if there are no errors.|
550
554
|`expires_at`| integer | The Unix timestamp (in seconds) for when the run will expire.|
551
555
|`started_at`| integer or null | The Unix timestamp (in seconds) for when the run was started.|
552
-
|`cancelled_at`| integer or null | The Unix timestamp (in seconds) for when the run was cancelled.|
556
+
|`cancelled_at`| integer or null | The Unix timestamp (in seconds) for when the run was canceled.|
553
557
|`failed_at`| integer or null | The Unix timestamp (in seconds) for when the run failed.|
554
558
|`completed_at`| integer or null | The Unix timestamp (in seconds) for when the run was completed.|
555
-
|`model`| string | The model that the assistant used for this run.|
559
+
|`model`| string | The model deployment name that the assistant used for this run.|
556
560
|`instructions`| string | The instructions that the assistant used for this run.|
557
561
|`tools`| array | The list of tools that the assistant used for this run.|
558
562
|`file_ids`| array | The list of File IDs the assistant used for this run.|
559
563
|`metadata`| map | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.|
560
-
|`usage`| object or null | Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).|
564
+
561
565
562
566
## Run step object
563
567
@@ -572,12 +576,12 @@ Represent a step in execution of a run.
572
576
|`thread_id`| string | The ID of the thread that was run.|
573
577
|`run_id`| string | The ID of the run that this run step is a part of.|
574
578
|`type`| string | The type of run step, which can be either message_creation or tool_calls.|
575
-
|`status`| string | The status of the run step, which can be either in_progress, cancelled, failed, completed, or expired.|
579
+
|`status`| string | The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.|
576
580
|`step_details`| object | The details of the run step.|
577
581
|`last_error`| object or null | The last error associated with this run step. Will be null if there are no errors.|
578
582
|`expired_at`| integer or null | The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.|
579
583
|`cancelled_at`| integer or null | The Unix timestamp (in seconds) for when the run step was cancelled.|
580
584
|`failed_at`| integer or null | The Unix timestamp (in seconds) for when the run step failed.|
581
585
|`completed_at`| integer or null | The Unix timestamp (in seconds) for when the run step completed.|
582
586
|`metadata`| map | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.|
583
-
|`usage`| object or null | Usage statistics related to the run step. This value will be null while the run step's status is in_progress.|
Copy file name to clipboardExpand all lines: articles/ai-services/openai/assistants-reference-threads.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,11 +29,11 @@ Create a thread.
29
29
|Name | Type | Required | Description |
30
30
|--- |--- |--- |--- |
31
31
|`messages`|array| Optional | A list of messages to start the thread with. |
32
-
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. |
32
+
|`metadata`| map | Optional | Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
33
33
34
34
### Returns
35
35
36
-
A thread object.
36
+
A [thread object](#thread-object).
37
37
38
38
### Example create thread request
39
39
@@ -131,7 +131,7 @@ Modifies a thread.
131
131
132
132
### Returns
133
133
134
-
The modified thread object matching the specified ID.
134
+
The modified [thread object](#thread-object) matching the specified ID.
0 commit comments