Skip to content

Commit 8a18a8e

Browse files
committed
update
1 parent 56096dc commit 8a18a8e

File tree

5 files changed

+69
-70
lines changed

5 files changed

+69
-70
lines changed

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Azure OpenAI Service Assistants Python & REST API messages reference
33
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.
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: conceptual
@@ -37,11 +37,11 @@ Create a message.
3737
| `role` | string | Required | The role of the entity that is creating the message. Currently only user is supported.|
3838
| `content` | string | Required | The content of the message. |
3939
| `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. |
4141

4242
### Returns
4343

44-
A message object.
44+
A [message](#message-object) object.
4545

4646
### Example create message request
4747

@@ -80,7 +80,6 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/mess
8080

8181
## List messages
8282

83-
8483
```http
8584
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/messages?api-version=2024-02-15-preview
8685
```
@@ -105,7 +104,7 @@ Returns a list of messages for a given thread.
105104

106105
### Returns
107106

108-
A list of message objects.
107+
A list of [message](#message-object) objects.
109108

110109
### Example list messages request
111110

@@ -159,7 +158,7 @@ Returns a list of message files.
159158

160159
### Returns
161160

162-
A list of message file objects
161+
A list of [message file](#message-file-object) objects
163162

164163
### Example list message files request
165164

@@ -210,7 +209,7 @@ Retrieves a message file.
210209

211210
### Returns
212211

213-
The message file object.
212+
The [message file](#message-file-object) object.
214213

215214
### Example retrieve message request
216215

@@ -255,13 +254,13 @@ Retrieves a message file.
255254

256255
|Parameter| Type | Required | Description |
257256
|---|---|---|---|
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. |
259258
|`message_id`| string | Required | The ID of the message that the file belongs to. |
260259
|`file_id` | string | Required | The ID of the file being retrieved. |
261260

262261
**Returns**
263262

264-
The message file object.
263+
The [message file](#message-file-object) object.
265264

266265
### Example retrieve message file request
267266

@@ -314,7 +313,7 @@ Modifies a message.
314313

315314
|Parameter| Type | Required | Description |
316315
|---|---|---|---|
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.|
318317

319318
### Returns
320319

@@ -375,16 +374,15 @@ Represents a message within a thread.
375374
| `assistant_id` | string or null |If applicable, the ID of the assistant that authored this message.|
376375
| `run_id` | string or null |If applicable, the ID of the run associated with the authoring of this message.|
377376
| `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.|
379378

380379
## Message file object
381380

382-
A list of files attached to a `message`
381+
A list of files attached to a message.
383382

384383
|Name | Type | Description |
385384
|--- |--- |--- |
386385
| `id`| string | The identifier, which can be referenced in API endpoints.|
387386
|`object`|string| The object type, which is always `thread.message.file`.|
388387
|`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.|

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

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Azure OpenAI Service Assistants Python & REST API runs reference
33
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.
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: conceptual
@@ -35,11 +35,11 @@ Create a run.
3535
|Name | Type | Required | Description |
3636
|--- |--- |--- |--- |
3737
| `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. |
3939
| `instructions` | string or null | Optional | Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis. |
4040
| `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. |
4141
| `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. |
4343

4444
### Returns
4545

@@ -92,7 +92,7 @@ Create a thread and run it in a single request.
9292
|--- |--- |--- |--- |
9393
| `assistant_id` | string | Required | The ID of the assistant to use to execute this run.|
9494
| `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.|
9696
| `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.|
9797
| `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.|
9898
| `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.
167167

168168
### Returns
169169

170-
A list of run objects.
170+
A list of [run](#run-object) objects.
171171

172172
### Example list runs request
173173

@@ -224,7 +224,7 @@ Returns a list of steps belonging to a run.
224224

225225
### Returns
226226

227-
A list of run step objects.
227+
A list of [run step](#run-step-object) objects.
228228

229229
### Example list run steps request
230230

@@ -273,7 +273,7 @@ Retrieves a run.
273273

274274
### Returns
275275

276-
The run object matching the specified run ID.
276+
The [run](#run-object) object matching the specified run ID.
277277

278278
### Example list run steps request
279279

@@ -323,7 +323,7 @@ Retrieves a run step.
323323

324324
### Returns
325325

326-
The run step object matching the specified ID.
326+
The [run step](#run-step-object) object matching the specified ID.
327327

328328
### Example retrieve run steps request
329329

@@ -377,6 +377,10 @@ Modifies a run.
377377
|--- |--- |--- |--- |
378378
| `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.|
379379

380+
### Returns
381+
382+
The modified [run](#run-object) object matching the specified ID.
383+
380384
### Example modify run request
381385

382386
# [Python 1.x](#tab/python)
@@ -432,11 +436,11 @@ When a run has the status: "requires_action" and required_action.type is submit_
432436

433437
|Name | Type | Required | Description |
434438
|--- |--- |--- |--- |
435-
| `tool_outputs | array | Required | |
439+
| `tool_outputs | array | Required | A list of tools for which the outputs are being submitted. |
436440

437441
### Returns
438442

439-
The modified run object matching the specified ID.
443+
The modified [run](#run-object) object matching the specified ID.
440444

441445
### Example submit tool outputs to run request
442446

@@ -500,7 +504,7 @@ Cancels a run that is in_progress.
500504

501505
### Returns
502506

503-
The modified run object matching the specified ID.
507+
The modified [run](#run-object) object matching the specified ID.
504508

505509
### Example submit tool outputs to run request
506510

@@ -544,20 +548,20 @@ Represents an execution run on a thread.
544548
| `created_at` | integer | The Unix timestamp (in seconds) for when the run was created.|
545549
| `thread_id` | string | The ID of the thread that was executed on as a part of this run.|
546550
| `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`.|
548552
| `required_action` | object or null | Details on the action required to continue the run. Will be null if no action is required.|
549553
| `last_error` | object or null | The last error associated with this run. Will be null if there are no errors.|
550554
| `expires_at` | integer | The Unix timestamp (in seconds) for when the run will expire.|
551555
| `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.|
553557
| `failed_at` | integer or null | The Unix timestamp (in seconds) for when the run failed.|
554558
| `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.|
556560
| `instructions` | string | The instructions that the assistant used for this run.|
557561
| `tools` | array | The list of tools that the assistant used for this run.|
558562
| `file_ids` | array | The list of File IDs the assistant used for this run.|
559563
| `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+
561565

562566
## Run step object
563567

@@ -572,12 +576,12 @@ Represent a step in execution of a run.
572576
| `thread_id`| string | The ID of the thread that was run.|
573577
| `run_id`| string | The ID of the run that this run step is a part of.|
574578
| `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`.|
576580
| `step_details`| object | The details of the run step.|
577581
| `last_error`| object or null | The last error associated with this run step. Will be null if there are no errors.|
578582
| `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.|
579583
| `cancelled_at`| integer or null | The Unix timestamp (in seconds) for when the run step was cancelled.|
580584
| `failed_at`| integer or null | The Unix timestamp (in seconds) for when the run step failed.|
581585
| `completed_at`| integer or null | The Unix timestamp (in seconds) for when the run step completed.|
582586
| `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.|
587+

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Create a thread.
2929
|Name | Type | Required | Description |
3030
|--- |--- |--- |--- |
3131
|`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. |
3333

3434
### Returns
3535

36-
A thread object.
36+
A [thread object](#thread-object).
3737

3838
### Example create thread request
3939

@@ -131,7 +131,7 @@ Modifies a thread.
131131

132132
### Returns
133133

134-
The modified thread object matching the specified ID.
134+
The modified [thread object](#thread-object) matching the specified ID.
135135

136136
### Example modify thread request
137137

@@ -169,6 +169,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}?api-
169169
}
170170
}'
171171
```
172+
172173
---
173174

174175
## Delete thread
@@ -214,6 +215,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}?api-
214215
-H 'Content-Type: application/json' \
215216
-X DELETE
216217
```
218+
217219
---
218220
## Thread object
219221

0 commit comments

Comments
 (0)