Skip to main content
Module

x/openai/streaming.ts>readableStreamAsyncIterable

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
function readableStreamAsyncIterable
import { readableStreamAsyncIterable } from "https://deno.land/x/openai@v4.40.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>