pub async fn select_backend(
config: &ModelConfig,
) -> Result<Arc<dyn EmbeddingBackend>>Expand description
Select an embedding backend based on environment variables.
Priority:
DAKERA_BACKENDโ explicit backend selectionDAKERA_USE_GPU=1โ Candle (CUDA/Metal) when thecandlefeature is compiled in- Default โ
OnnxBackend
ยงErrors
Returns an error if the requested backend is not compiled in or fails to initialise.