Skip to main content

try_embed_query_with_choice

Function try_embed_query_with_choice 

Source
pub fn try_embed_query_with_choice(
    models_dir: &Path,
    text: &str,
    choice: Option<LlmBackendChoice>,
) -> Result<(Vec<f32>, LlmBackendKind), FallbackReason>
Expand description

failure, returns a structured FallbackReason so the caller can surface vec_degraded instead of a hard exit 11.

None matches the legacy try_embed_query_with_fallback path (uses the active embedder without an explicit chain).