ChatCompletionRequest
Request for chat completion with tool calling.
messages object[]required
List of messages in the conversation
Array [
roleRole (string)required
Message role: 'user', 'assistant', 'system', or 'tool'
contentContent (string)required
Message content
tool_call_id object
For tool messages, the ID of the tool call
- string
- null
string
null
name object
For tool messages, the tool name
- string
- null
string
null
]
max_tool_iterationsMax Tool Iterations (integer)
Maximum number of tool call iterations (default: 5)
Possible values: >= 1 and <= 10
Default value:
5streamStream (boolean)
If true, stream the final assistant response in the body as newline-delimited JSON.
Default value:
falseChatCompletionRequest
{
"messages": [
{
"role": "string",
"content": "string",
"tool_call_id": "string",
"name": "string"
}
],
"max_tool_iterations": 5,
"stream": false
}