EmbeddingProvider

Trait EmbeddingProvider 

Source
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§

Source

fn model_name(&self) -> &str

Returns the model identifier (e.g. "text-embedding-3-small").

Source

fn dims(&self) -> usize

Returns the embedding vector dimensionality (e.g. 1536).

Implementors§