import { PagePromise } from "https://deno.land/x/openai@v4.61.1/core.ts";
This subclass of Promise will resolve to an instantiated Page once the request completes.
It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg:
for await (const item of client.items.list()) { console.log(item) }
Type Parameters
PageClass extends AbstractPage<Item>
optional
Item = ReturnType<PageClass["getPaginatedItems"]>[number]Methods
Allow auto-paginating iteration on an unawaited list call, eg:
for await (const item of client.items.list()) { console.log(item) }