Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.45.0/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().