Dedicated chat completions chunk object
Represents a streamed chunk of a chat completions response returned by model, based on the provided input.
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": { "role": "assistant", "content": "This" },
"finish_reason": null,
"logprobs": null
}
],
"usage": null,
"created": 1726294381
}
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": { "content": " is" },
"finish_reason": null,
"logprobs": null
}
],
"usage": null,
"created": 1726294381
}
...
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": {},
"finish_reason": "stop",
"logprobs": null
}
],
"usage": null,
"created": 1726294383
}
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 4,
"total_tokens": 12
},
"created": 1726294402
}
data: [DONE]
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": { "role": "assistant", "content": "This" },
"finish_reason": null,
"logprobs": null
}
],
"usage": null,
"created": 1726294381
}
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": { "content": " is" },
"finish_reason": null,
"logprobs": null
}
],
"usage": null,
"created": 1726294381
}
...
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": {},
"finish_reason": "stop",
"logprobs": null
}
],
"usage": null,
"created": 1726294383
}
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 4,
"total_tokens": 12
},
"created": 1726294402
}
data: [DONE]
A unique ID of the chat completion.
The object type, which is always set to chat.completion.chunk
.
The model to generate the completion. For dedicated endpoints, it returns the endpoint id.
The index of the choice in the list of generated choices.
Role of the generated message author, in this case assistant
.
The contents of the assistant message.
The index of tool call being generated.
The ID of the tool call.
The type of the tool, which is always set to function
.
Termination condition of the generation.
stop
means the API returned the full chat completions generated by the model without running into any limits.
length
means the generation exceeded max_tokens
or the conversation exceeded the max context length.
tool_calls
means the API has generated tool calls.
Available options: stop
, length
, tool_calls
Log probability information for the choice.
A list of message content tokens with log probability information.
The token.
The log probability of this token.
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null
if there is no bytes representation for the token.
List of the most likely tokens and their log probability, at this token position.
The token.
The log probability of this token.
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null
if there is no bytes representation for the token.
The Unix timestamp (in seconds) for when the token sampled.
Was this page helpful?
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": { "role": "assistant", "content": "This" },
"finish_reason": null,
"logprobs": null
}
],
"usage": null,
"created": 1726294381
}
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": { "content": " is" },
"finish_reason": null,
"logprobs": null
}
],
"usage": null,
"created": 1726294381
}
...
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": {},
"finish_reason": "stop",
"logprobs": null
}
],
"usage": null,
"created": 1726294383
}
data: {
"id": "chatcmpl-4b71d12c86d94e719c7e3984a7bb7941",
"model": "(endpoint-id)",
"object": "chat.completion.chunk",
"choices": [],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 4,
"total_tokens": 12
},
"created": 1726294402
}
data: [DONE]