Expand description
Embedding capability for the llm-suite group.
Provides a provider trait plus an OpenAI-compatible HTTP implementation covering every OpenAI-compatible endpoint (OpenAI, Gemini, Azure, Ollama). Query preprocessing (Nomic/Stella task prefixes) is ported from linkrs.
This crate intentionally has no feature flags: the HTTP call and provider presets carry little extra complexity, so a single implementation path is preferred. Token-budget batching stays out on purpose: it needs a tokenizer that would couple this leaf crate to engine code.
Re-exports§
pub use config::EmbeddingConfig;pub use error::EmbeddingError;pub use error::Result;pub use openai_compatible::OpenAICompatibleProvider;pub use preprocessor::PreprocessorConfig;pub use preprocessor::PreprocessorImpl;pub use provider::EmbeddingProvider;pub use provider::EmbeddingResult;pub use service::EmbeddingService;
Modules§
- config
- Configuration for embedding providers.
- error
- Error type for the embedding crate.
- openai_
compatible - OpenAI-compatible HTTP embedding provider.
- preprocessor
- Query text preprocessing before embedding.
- provider
- Provider trait and result types for embeddings.
- service
- High-level embedding service wrapping a provider.