Skip to main content

Chunks

Each data: line holds a chat.completion.chunk. All chunks of one answer share one id. The last content chunk has finish_reason: stop, length, tool_calls or content_filter. With include_usage, one more chunk follows with an empty choices array and the usage object. The stream ends with data: [DONE]. If a provider fails after the stream has started, a chunk with a top-level error object arrives, followed by data: [DONE]. See Errors.