Skip to main content

detect_backends

Function detect_backends 

Source
pub fn detect_backends(model_repo: &str) -> Result<Vec<Box<dyn EmbedBackend>>>
Expand description

Detect all available backends and load them.

Probes for GPU backends (CUDA, MLX) first, then falls back to CPU. Returns backends in priority order — the first entry is the primary (used for query embedding in interactive mode).

§Errors

Returns an error if no backends can be loaded (not even CPU).