ChatMessage
A single message in a chat conversation.
roleRole (string)required
Message role: 'user', 'assistant', 'system', or 'tool'
content object
Message content. Usually a string, but may be a multimodal content list (e.g. text + image_url) or null for assistant turns that only request tool calls.
- 0-item-properties
- null
null
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
tool_calls object
For assistant messages replayed from prior turns, the OpenAI-format tool calls the model previously requested. Replaying these verbatim keeps the conversation prefix byte-for-byte identical so the model server's prompt cache hits on follow-up turns.
- array
- null
Array [
object
]
null
ChatMessage
{
"role": "string",
"tool_call_id": "string",
"name": "string",
"tool_calls": [
{}
]
}