Text content of the message. Empty string for assistant messages that only contain tool_calls.
OptionalimagesImages attached to the message. Supported as Blob, raw bytes, or base64 strings.
Optionalreasoning_Chain-of-thought / reasoning exposed by some providers (e.g. DeepSeek).
Sender role — determines how the message is interpreted by the model.
Optionaltool_ID of the tool call this message is responding to. Present only on tool messages.
Optionaltool_Tool calls emitted by the assistant. Present only on assistant messages.
A single message in an LLM chat history. Covers all roles: system instructions, user input, assistant responses, and tool results.