Learn how to enable streaming responses in the Cerebras API.
stream
parameter to True
within the chat.completions.create
method. This will result in the API returning an iterable containing the chunks of the message.
Similarly, the same can be done in TypeScript by setting the stream
property to true
within the chat.completions.create
method.
Initial Setup
Streaming Responses
stream
parameter to True
within the chat.completions.create
method to enable streaming responses.