Skip to main content

openai.createchatcompletionprops.stream

Home > @runlightyear/openai > CreateChatCompletionProps > stream

CreateChatCompletionProps.stream property

If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. See the OpenAI Cookbook for example code.

Defaults to false

Signature:
stream?: boolean;