Skip to main content

Crate blazen_embed_fastembed

Crate blazen_embed_fastembed 

Source
Expand description

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};

let model = FastEmbedModel::from_options(FastEmbedOptions::default())?;
let response = model.embed(&["hello".into(), "world".into()]).await?;
assert_eq!(response.embeddings.len(), 2);

Structs§

FastEmbedModel
A local embedding model backed by fastembed (ONNX Runtime).
FastEmbedOptions
Options for constructing a FastEmbedModel.
FastEmbedResponse
Response from a fastembed embedding operation.

Enums§

FastEmbedError
Error type for fastembed operations.