Skip to content

Commit f617eaa

Browse files
Merge pull request #276074 from aahill/extra-publish
python example, parameter
2 parents d3c61e1 + 78b518c commit f617eaa

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,30 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs
259259

260260
## Retrieve run
261261

262+
# [Python 1.x](#tab/python)
263+
264+
```python
265+
from openai import OpenAI
266+
client = OpenAI()
267+
268+
run = client.beta.threads.runs.retrieve(
269+
thread_id="thread_abc123",
270+
run_id="run_abc123"
271+
)
272+
273+
print(run)
274+
```
275+
276+
# [REST](#tab/rest)
277+
262278
```http
263-
GET https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}?api-version=2024-05-01-preview
279+
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/threads/{thread_id}/runs/{run_id}?api-version=2024-05-01-preview
280+
-H "api-key: $AZURE_OPENAI_API_KEY" \
281+
-H 'Content-Type: application/json'
264282
```
265283

284+
---
285+
266286
Retrieves a run.
267287

268288
**Path parameters**
@@ -565,6 +585,7 @@ Represents an execution run on a thread.
565585
| `tool_choice` | string or object | Controls which (if any) tool is called by the model. `none` means the model won't call any tools and instead generates a message. `auto` is the default value and means the model can pick between generating a message or calling a tool. Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. |
566586
| `max_prompt_tokens` | integer or null | The maximum number of prompt tokens specified to have been used over the course of the run. |
567587
| `max_completion_tokens` | integer or null | The maximum number of completion tokens specified to have been used over the course of the run. |
588+
| `usage` | object or null | Usage statistics related to the run. This value will be null if the run is not in a terminal state (for example `in_progress`, `queued`). |
568589

569590

570591
## Run step object

articles/ai-services/openai/concepts/models.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ For Assistants you need a combination of a supported model, and a supported regi
309309
| East US || | | | ||
310310
| East US 2 || |||| |
311311
| France Central ||| ||| |
312-
| India South | || | || |
313312
| Japan East || | | | | |
314313
| Norway East | | | | || |
315314
| Sweden Central |||||| |

articles/ai-services/openai/whats-new.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ You can now create messages with the [assistant](.//assistants-reference-message
4040
* UK South
4141
* West US
4242
* West US 3
43-
* India South
4443
* Norway east
4544

4645
For more information, see the [blog post](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/announcing-azure-openai-service-assistants-preview-refresh/ba-p/4143217) about assistants.

0 commit comments

Comments
 (0)