Skip to main content

SparseEmbedding

Trait SparseEmbedding 

Source
pub trait SparseEmbedding: Send + Sync {
    // Required method
    fn embed_sparse(&self, input: &EmbeddingInput) -> Result<Vec<(u32, f32)>>;
}
Expand description

Sparse embedding provider.

Required Methods§

Source

fn embed_sparse(&self, input: &EmbeddingInput) -> Result<Vec<(u32, f32)>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§