Skip to main content

Module message

Module message 

Source
Expand description

Chat message types exchanged between the agent runtime and model providers.

These types replace the subset of rig’s message model that this project actually uses. Their JSON representations are byte-compatible with the rig types they replace (rig 0.31), because persisted conversation histories embed them — do not change serde attributes without a migration plan. Fields rig serialized but this project never populated (e.g. tool call signatures) have been dropped; they deserialize as ignored unknown fields from old data.

Structs§

Image
Image content with its source data and media type.
Reasoning
An assistant reasoning (“thinking”) block.
Text
A plain text block.
ToolCall
A tool invocation requested by the model.
ToolFunction
The function name and arguments of a ToolCall.
ToolResult
The result of executing a tool call, sent back as user content.

Enums§

AssistantContent
Content of an assistant message.
ImageMediaType
Image media type.
ImageSource
Where an Image’s data comes from.
Message
A message in a conversation: one run of user input or assistant output.
ReasoningContent
One block of reasoning content.
ToolResultContent
Content of a ToolResult: text or an image.
UserContent
Content of a user message.