File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -351,18 +351,18 @@ for page in replicate.paginate(replicate.predictions.list):
351351### After (v2)
352352
353353``` python
354- # Auto-pagination built-in
355- page = replicate.predictions.list()
356-
357- # Iterate directly over page
358- for prediction in page:
354+ # Auto-pagination: iterate through all pages automatically
355+ for prediction in replicate.predictions.list():
359356 print (prediction.id)
357+ # Automatically fetches more pages as needed
360358
361- # Manual pagination
359+ # Manual pagination (if needed)
360+ page = replicate.predictions.list()
362361if page.has_next_page():
363362 next_page = page.get_next_page()
364363
365- # Access results list still available
364+ # Access results from a single page
365+ page = replicate.predictions.list()
366366for prediction in page.results:
367367 print (prediction.id)
368368```
You can’t perform that action at this time.
0 commit comments