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

x/openai/resources/chat/mod.ts>ChatCompletionStreamOptions

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
interface ChatCompletionStreamOptions
import { type ChatCompletionStreamOptions } from "https://deno.land/x/openai@v4.53.2/resources/chat/mod.ts";

Options for streaming response. Only set this when you set stream: true.

Properties

optional
include_usage: boolean

If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.