Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/streaming.ts>readableStreamAsyncIterable

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Latest
function readableStreamAsyncIterable
import { readableStreamAsyncIterable } from "https://deno.land/x/openai@v4.69.0/streaming.ts";

Most browsers don't yet have async iterable support for ReadableStream, and Node has a very different way of reading bytes from its "ReadableStream".

This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490

Parameters

stream: any

Returns

AsyncIterableIterator<T>