pub trait EmbeddingProvider: Send + Sync {
// Required methods
fn model_name(&self) -> &str;
fn dims(&self) -> usize;
}Expand description
Trait for embedding providers.
Defines the interface that all embedding backends must implement. Implementations are created by the application and passed to core functions that need embedding metadata.
Required Methods§
Sourcefn model_name(&self) -> &str
fn model_name(&self) -> &str
Returns the model identifier (e.g. "text-embedding-3-small").
Implementors§
impl EmbeddingProvider for DisabledProvider
impl EmbeddingProvider for LocalProvider
Available on crate features
local-embeddings-fastembed or local-embeddings-tract only.