File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -364,13 +364,13 @@ List methods in the Anthropic API are paginated.
364
364
You can use the ` for await … of ` syntax to iterate through items across all pages:
365
365
366
366
``` ts
367
- async function fetchAllBetaMessagesBatches (params ) {
368
- const allBetaMessagesBatches = [];
367
+ async function fetchAllBetaMessageBatches (params ) {
368
+ const allBetaMessageBatches = [];
369
369
// Automatically fetches more pages as needed.
370
370
for await (const betaMessageBatch of client .beta .messages .batches .list ({ limit: 20 })) {
371
- allBetaMessagesBatches .push (betaMessageBatch );
371
+ allBetaMessageBatches .push (betaMessageBatch );
372
372
}
373
- return allBetaMessagesBatches ;
373
+ return allBetaMessageBatches ;
374
374
}
375
375
```
376
376
You can’t perform that action at this time.
0 commit comments