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

x/openai/resources/beta/chat/completions.ts>ChatCompletionStream.fromReadableStream

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
method ChatCompletionStream.fromReadableStream
Re-export
import { ChatCompletionStream } from "https://deno.land/x/openai@v4.33.1/resources/beta/chat/completions.ts";

Intended for use on the frontend, consuming a stream produced with .toReadableStream() on the backend.

Note that messages sent to the model do not appear in .on('message') in this context.