Skip to content

Commit ae0c270

Browse files
committed
update
1 parent aaa0ee7 commit ae0c270

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

articles/ai-services/openai/includes/batch/batch-python.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,27 @@ client.batches.cancel("batch_abc123") # set to your batch_id for the job you wan
401401

402402
### List batch
403403

404-
List all batch jobs for a particular Azure OpenAI resource.
404+
List batch jobs for a particular Azure OpenAI resource.
405405

406406
```python
407407
client.batches.list()
408408
```
409409

410+
List methods in the Python library are paginated.
411+
412+
To list all jobs:
413+
414+
```python
415+
all_jobs = []
416+
# Automatically fetches more pages as needed.
417+
for job in client.batches.list(
418+
limit=20,
419+
):
420+
# Do something with job here
421+
all_jobs.append(job)
422+
print(all_jobs)
423+
```
424+
410425
### List batch (Preview)
411426

412427
Use the REST API to list all batch jobs with additional sorting/filtering options.

0 commit comments

Comments
 (0)