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

x/openai/streaming.ts>Stream#toReadableStream

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
method Stream.prototype.toReadableStream
import { Stream } from "https://deno.land/x/openai@v4.62.1/streaming.ts";

Converts this stream to a newline-separated ReadableStream of JSON stringified values in the stream which can be turned back into a Stream with Stream.fromReadableStream().