blazen-embed-fastembed 0.1.130

Local embedding model backend for Blazen using fastembed-rs (ONNX Runtime)
Documentation

Local embedding model backend for Blazen using [fastembed].

This crate wraps the [fastembed] Rust crate (ONNX Runtime) to provide fully local, offline vector embeddings with no API keys required.

When used through blazen-llm with the fastembed feature flag, this crate's [FastEmbedModel] automatically implements blazen_llm::EmbeddingModel.

Quick start

use blazen_embed_fastembed::{FastEmbedModel, FastEmbedOptions};

# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let model = FastEmbedModel::from_options(FastEmbedOptions::default())?;
let response = model.embed(&["hello".into(), "world".into()]).await?;
assert_eq!(response.embeddings.len(), 2);
# Ok(())
# }