Skip to main content

embed_query

Function embed_query 

Source
pub fn embed_query(
    embedder: &Mutex<LlmEmbedding>,
    text: &str,
) -> Result<Vec<f32>, AppError>
Expand description

Embeds a single query for similarity search. Same model and dim as embed_passage; the only difference is the LLM-side prompt prefix that the headless invocation uses to disambiguate.