Module traits

Module traits 

Source
Expand description

Core traits that every provider and model implementation must satisfy.

Structs§

AudioOutput
Audio output produced by a speech model.
GeneratedImage
An image produced by a generation call (e.g. from a diffusion model).
GenerationOptions
Sampling and length parameters for text generation.
GenerationResult
The output of a generation call.
Message
A single message in a conversation, containing one or more content blocks.
ProviderCapabilities
Advertised capabilities of a ModelProvider.
ScoredDoc
A single scored document returned by a RerankerModel.
TokenUsage
Token counts for a generation request.

Enums§

ContentBlock
A single block of content within a Message.
ImageInput
Image data that can be passed as part of a ContentBlock.
MessageRole
The role of a message in a conversation.
ProviderHealth
Health status reported by a provider.

Traits§

EmbeddingModel
A model that produces dense vector embeddings from text.
GeneratorModel
A model that generates text, images, or audio from a conversational message history.
ModelProvider
A pluggable backend that knows how to load models for one or more ModelTask types.
RerankerModel
A model that re-scores documents against a query for relevance ranking.

Type Aliases§

LoadedModelHandle
A type-erased, reference-counted handle to a loaded model instance.