stream=true
is set in the request.
Request Headers
The API key to use for the request.
The content type of the request. Should be
application/json
.Request Body
An array of messages of the conversation so far.
The model to use for the UI completion. Should be one of the models listed in the Models page.
The temperature to use for the UI completion. Should be between 0 and 1.
The top-p value to use for the UI completion. Should be between 0 and 1.
The maximum number of tokens to use for the UI completion.
The number of completions to generate.
Should be unset or set to 1.
Whether to stream the response. Should be
true
for streaming.All other request parameters are ignored.
SSE Event Stream
A identifier for this event.
One of the following objects:
Completion Chunk
A unique identifier for the UI completion. Will be the same in all events for a given completion.
The object type, which is always
chat.completion.chunk
Timestamp for when the chunk was created.
The model used to generate the UI completion.
An object containing the usage statistics for the UI completion
Only present if the generation is complete.
An array of completions. Will always contain exactly one object.