Skip to main content

Module message

Module message 

Source
Expand description

§Conversation messages

The conversation history is a Vec<Message> that you own. Pass it to a run with AgentRequest::with_history in agentai and append AgentResult::new_messages to it to continue the conversation.

Messages implement Serialize and Deserialize with a format defined by this crate, so a stored history keeps working when the LLM client used inside agentai changes.

Structs§

Media
An image, audio or other file in a message.
Message
One message of the conversation history.
ProviderData
Provider-specific data in a message. It has no meaning outside the provider that produced it.
ToolCall
A tool call requested by the model.
ToolOutput
What a tool sends back to the model: text and media (for example a generated image), in order.
ToolResponse
The result of a tool call, sent back to the model.

Enums§

MediaSource
Where the bytes of Media are.
Part
A piece of a Message.
Role
Who wrote a Message.