Represents a streamed chunk of a tool assisted chat completions response returned by model, based on the provided input.

This API is currently in Beta. While we strive to provide a stable and reliable experience, this feature is still under active development. As a result, you may encounter unexpected behavior or limitations. We encourage you to provide feedback to help us improve the feature before its official release.

id
string
required

A unique ID of the chat completion.

object
string
required

The object type, which is always set to chat.completion.chunk.

choices
object[]
required
usage
object | null
created
integer
required

The Unix timestamp (in seconds) for when the token sampled.

event: tool_status chunk object

event: tool_status tracks the execution progress of built-in tools, such as calculator or web search functions. It provides real-time updates on their status and results.

tool_call_id
string
required

The ID of the tool call.

name
enum<string>
required

The name of the built-in tool.

Available options: math:calculator, math:statistics, math:calendar, web:search, web:url, code:python-interpreter, file:text

status
enum<string>
required

Indicates the current execution status of the tool.

Available options: STARTED, UPDATING, ENDED, ERRORED

parameters
object[]
required
result
string | null

The output from the tool’s execution.

files
object[] | null
message
string | null

Message generated by the tool’s execution.

error
object | null
timestamp
number
required

The Unix timestamp (in seconds) for when the event occurred.