Skip to main content

provider_from_config

Function provider_from_config 

Source
pub fn provider_from_config(
    cfg: &Embedding,
    idx_dim: usize,
) -> Box<dyn EmbeddingProvider>
Expand description

Build the embedding provider requested by config with an honest fallback: a configured provider that cannot be initialized is reported on stderr instead of silently degrading to the mock. The mock is returned for “mock”/“none” (and as a last resort), with idx_dim as its dimension.