Skip to main content

uni_xervo/
prelude.rs

1//! Convenience re-exports for the common uni-xervo surface.
2//!
3//! `use uni_xervo::prelude::*;` brings the runtime, catalog/config types, every
4//! task trait (so their methods are in scope on `Arc<dyn …>` handles), the
5//! common input/result types, and the host-side scoring helpers into scope.
6//! Provider types stay in [`crate::provider`] — import the concrete providers
7//! you register explicitly.
8
9// Runtime + catalog/config.
10#[doc(inline)]
11pub use crate::api::{ModelAliasSpec, ModelTask, RetryConfig, WarmupPolicy};
12#[doc(inline)]
13pub use crate::error::{Result, RuntimeError};
14#[doc(inline)]
15pub use crate::runtime::{ModelRuntime, ModelRuntimeBuilder};
16
17// Provider + capability surface.
18#[doc(inline)]
19pub use crate::traits::{ModelProvider, ProviderCapabilities, ProviderHealth};
20
21// Metadata supertrait + every task trait (method-in-scope on handles).
22#[doc(inline)]
23pub use crate::traits::{
24    AudioEmbeddingModel, DocumentExtractionModel, EmbeddingModel, GeneratorModel,
25    HybridEmbeddingModel, ImageEmbeddingModel, ModelInfo, MultiVectorEmbeddingModel,
26    MultimodalEmbeddingModel, NlpModel, OcrModel, RawTensorModel, RerankerModel,
27    SparseEmbeddingModel, TranscriptionModel,
28};
29
30// Inputs, options, and result types.
31#[doc(inline)]
32pub use crate::traits::{
33    AudioInput, ContentBlock, DocExtractOptions, DocExtractResult, DocOutputFormat, EmbedResult,
34    GenerationOptions, GenerationResult, HeadSet, HybridEmbedResult, ImageInput, Message, Modality,
35    MultiVectorEmbedResult, MultimodalBlock, MultimodalInput, NlpRequest, NlpResult, NlpTasks,
36    ScoredDoc, SparseEmbedResult, SparseVector, TensorBatch, TensorSpec, TensorValue, TokenUsage,
37    TranscribeOptions, TranscribeResult,
38};
39
40// Host-side scoring helpers for sparse / multi-vector outputs.
41#[doc(inline)]
42pub use crate::score::{colbert_rerank, max_sim, sparse_dot};