pub trait DocumentEmbedder: Send + Sync {
// Required method
fn embed_document(&self, text: &str) -> Result<Vec<f32>>;
}Expand description
Embeds text for storage as a document: bare, never through
embed_query, because BGE retrieval is asymmetric and the instruction
prefix belongs on the query side only. A host that embeds somewhere other
than an in-process Embedder implements this to feed ingestion.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".