Skip to main content

Module traits

Module traits 

Source
Expand description

Core traits that every provider and model implementation must satisfy.

Re-exports§

pub use raw_tensor_model::DimSize;
pub use raw_tensor_model::RawTensorModel;
pub use raw_tensor_model::TensorBatch;
pub use raw_tensor_model::TensorDtype;
pub use raw_tensor_model::TensorSpec;
pub use raw_tensor_model::TensorValue;
pub use asr::TranscribeOptions;
pub use asr::TranscribeResult;
pub use asr::TranscribeSegment;
pub use asr::TranscribeWord;
pub use asr::TranscriptionModel;
pub use docs::DocBlock;
pub use docs::DocBlockKind;
pub use docs::DocExtractOptions;
pub use docs::DocExtractResult;
pub use docs::DocOutputFormat;
pub use docs::DocumentExtractionModel;
pub use docs::OcrBlock;
pub use docs::OcrModel;
pub use docs::OcrResult;
pub use hybrid::HeadSet;
pub use hybrid::HybridEmbedResult;
pub use hybrid::HybridEmbeddingModel;
pub use multimodal::AudioEmbeddingModel;
pub use multimodal::AudioInput;
pub use multimodal::ImageEmbeddingModel;
pub use multimodal::Modality;
pub use multimodal::MultimodalBlock;
pub use multimodal::MultimodalEmbeddingModel;
pub use multimodal::MultimodalInput;
pub use multivector::MultiVectorEmbedResult;
pub use multivector::MultiVectorEmbeddingModel;
pub use nlp::NerEntity;
pub use nlp::NlpLabelMaps;
pub use nlp::NlpModel;
pub use nlp::NlpRequest;
pub use nlp::NlpResult;
pub use nlp::NlpSentence;
pub use nlp::NlpTasks;
pub use nlp::NlpToken;
pub use nlp::SpeechAct;
pub use nlp::SrlFrame;
pub use nlp::SrlRole;
pub use sparse::SparseEmbedResult;
pub use sparse::SparseEmbeddingModel;
pub use sparse::SparseVector;

Modules§

asr
Automatic speech recognition types and trait.
docs
Document understanding types and traits — VLM-based extraction and OCR.
hybrid
Single-pass hybrid embedding: the HybridEmbeddingModel trait and its HeadSet / HybridEmbedResult types.
multimodal
Multimodal embedding types and traits (image / audio / mixed-modality).
multivector
Multi-vector (late-interaction / ColBERT) embedding types and the MultiVectorEmbeddingModel trait.
nlp
Structured natural-language analysis types and traits.
raw_tensor_model
sparse
Learned-sparse text embedding types and the SparseEmbeddingModel trait.

Structs§

AudioOutput
Audio output produced by a speech model.
EmbedResult
Result of a dense-embedding call, carrying the vectors plus optional usage.
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.
ModelInfo
Metadata common to every loaded model handle.
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.