Skip to main content

Module model

Module model 

Source
Expand description

The model backend trait and chat messages. Inference lives elsewhere (weirdnet-model, remote nodes); this crate only drives it.

Structs§

DeltaSink
Where a backend streams text as it is sampled.
ImageUrl
InputAudio
Message
Modalities
Input kinds beyond text: what a request needs, or what a model accepts.
ModelTurn
One model turn: final text and any tool calls.
ToolCall
A tool call the model asked for.

Enums§

Content
What a message says: plain text, or OpenAI-style parts (text, images, audio).
ContentPart
One part of a Content::Parts message, in the OpenAI chat shape.
ModelError
ModelNotice
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§

ModelBackend
A chat model with tool calling. Implementations should poll cancel while sampling and stream text through deltas.

Functions§

needs
What a model needs to read all of messages.