Skip to main content

embed_passage_or_skip

Function embed_passage_or_skip 

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

v1.0.89 (BUG-SKIP-EMBED + GAP-EMBED-PROPAGATION): embed a passage honouring both --llm-backend and --skip-embedding-on-failure.

On success returns Ok(Some(vec)). On failure:

  • if --skip-embedding-on-failure is active, logs a warning and returns Ok(None)
  • otherwise propagates the error (exit 11)