Skip to main content

Module prelude

Module prelude 

Source
Expand description

Convenience re-exports for the common uni-xervo surface.

use uni_xervo::prelude::*; brings the runtime, catalog/config types, every task trait (so their methods are in scope on Arc<dyn …> handles), the common input/result types, and the host-side scoring helpers into scope. Provider types stay in crate::provider — import the concrete providers you register explicitly.

Structs§

DocExtractOptions
Options for a DocumentExtractionModel::extract call.
DocExtractResult
Per-page result of a document extraction call.
EmbedResult
Result of a dense-embedding call, carrying the vectors plus optional usage.
GenerationOptions
Sampling and length parameters for text generation.
GenerationResult
The output of a generation call.
HeadSet
Selects which embedding heads a HybridEmbeddingModel should populate.
HybridEmbedResult
Dense, sparse, and multi-vector embeddings from a single forward pass.
Message
A single message in a conversation, containing one or more content blocks.
ModelAliasSpec
Declarative specification that maps a human-readable alias to a concrete provider and model.
ModelRuntime
The central runtime that owns registered providers and a catalog of model aliases.
ModelRuntimeBuilder
Builder for constructing a ModelRuntime with registered providers, a model catalog, and a warmup policy.
MultiVectorEmbedResult
Result of a multi-vector embedding call: per-token vectors for each input.
MultimodalInput
A heterogeneous input to a MultimodalEmbeddingModel.
NlpRequest
One NLP analysis request: a text plus the heads to populate.
NlpResult
Structured output of an NLP analysis call.
NlpTasks
Selects which NLP heads a caller wants populated.
ProviderCapabilities
Advertised capabilities of a ModelProvider.
RetryConfig
Configuration for exponential-backoff retries on transient inference errors.
ScoredDoc
A single scored document returned by a RerankerModel.
SparseEmbedResult
Result of a sparse-embedding call, carrying one SparseVector per input.
TensorBatch
TensorSpec
TokenUsage
Token counts for a generation request.
TranscribeOptions
Options for a TranscriptionModel::transcribe call.
TranscribeResult
Result of a transcription call.

Enums§

AudioInput
An audio input to a transcription or audio embedding model.
ContentBlock
A single block of content within a Message.
DocOutputFormat
Output format for the in-block content string of DocBlock.
ImageInput
Image data that can be passed as part of a ContentBlock.
Modality
Modality labels reported by MultimodalEmbeddingModel::supported_modalities.
ModelTask
The kind of inference task a model performs.
MultimodalBlock
One block of input to a MultimodalEmbeddingModel.
ProviderHealth
Health status reported by a provider.
RuntimeError
Unified error type covering configuration, loading, inference, and transport failures.
TensorValue
WarmupPolicy
Controls when a model or provider is initialized during runtime startup.

Traits§

AudioEmbeddingModel
A model that produces dense vector embeddings from audio.
DocumentExtractionModel
A vision-language model that extracts structured blocks from document page images.
EmbeddingModel
A model that produces dense vector embeddings from text.
GeneratorModel
A model that generates text, images, or audio from a conversational message history.
HybridEmbeddingModel
A model that produces several embedding heads from one shared forward pass.
ImageEmbeddingModel
A model that produces dense vector embeddings from images.
ModelInfo
Metadata common to every loaded model handle.
ModelProvider
A pluggable backend that knows how to load models for one or more ModelTask types.
MultiVectorEmbeddingModel
A model that produces per-token (multi-vector / ColBERT) embeddings from text.
MultimodalEmbeddingModel
A model that produces a single dense vector from heterogeneous content (text + image + audio together).
NlpModel
A multi-head structured-NLP model.
OcrModel
A model that recognizes text in images (optical character recognition).
RawTensorModel
RerankerModel
A model that re-scores documents against a query for relevance ranking.
SparseEmbeddingModel
A model that produces learned-sparse term-weight vectors from text.
TranscriptionModel
A model that transcribes speech audio into text with timing information.

Functions§

colbert_rerank
Rank docs against query by max_sim, returning one score per document.
max_sim
Compute the MaxSim late-interaction score between query and document tokens.
sparse_dot
Compute the dot product of two learned-sparse vectors.

Type Aliases§

Result
Convenience alias used throughout the crate.
SparseVector
A single learned-sparse vector as (term_id, weight) pairs.