Skip to main content

embed_query

Function embed_query 

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

Embeds a search query using the query: prefix required by E5 models.

ยงErrors

Returns Err when the mutex is poisoned or the model returns an unexpected result.