Expand description
The model backend trait and chat messages. Inference lives elsewhere
(weirdnet-model, remote nodes); this crate only drives it.
Structs§
- Delta
Sink - Where a backend streams text as it is sampled.
- Image
Url - Input
Audio - Message
- Modalities
- Input kinds beyond text: what a request needs, or what a model accepts.
- Model
Turn - One model turn: final text and any tool calls.
- Tool
Call - A tool call the model asked for.
Enums§
- Content
- What a message says: plain text, or OpenAI-style parts (text, images, audio).
- Content
Part - One part of a
Content::Partsmessage, in the OpenAI chat shape. - Model
Error - Model
Notice - Where a turn’s model runs, when that changes during the turn: shown to the user as a short
note (
AgentEvent::ModelNotice), never part of the turn’s text. - Role
Traits§
- Model
Backend - A chat model with tool calling. Implementations should poll
cancelwhile sampling and stream text throughdeltas.
Functions§
- needs
- What a model needs to read all of
messages.