Skip to main content

select_embedding_provider

Function select_embedding_provider 

Source
pub fn select_embedding_provider(
    llm_config: Option<LlmEmbeddingConfig>,
) -> Box<dyn EmbeddingProvider>
Expand description

Select the best available embedding provider based on configuration.

Priority order:

  1. ONNX local model if onnx_model_path points to a valid .onnx file
  2. LLM API if llm_embedding config is present
  3. Mock (fallback, for testing or when no backend available)