Skip to main content

Module message

Module message 

Source
Expand description

Message types used in conversations with the model and between tools.

A conversation is an ordered list of Messages. Each message has a Role (system / user / assistant / tool) and one or more ContentBlocks. Blocks carry the actual payload — plain text, a tool call requested by the model, or the result of executing a tool call.

Structs§

Message
A single message in the conversation: a role plus an ordered list of content blocks.
TextBlock
A plain-text block of content.
ThinkingBlock
A reasoning trace produced by a thinking-capable model.
ToolCall
A request from the assistant to invoke a named tool with structured arguments.
ToolResult
The outcome of executing a ToolCall.

Enums§

ContentBlock
A single piece of content within a Message.
Role
Speaker of a message in the conversation.
SystemReminder