#![forbid(unsafe_code)]
pub mod config;
pub mod errors;
#[cfg(feature = "fastembed-backend")]
pub mod fastembed;
#[cfg(feature = "ollama")]
pub mod ollama;
#[cfg(feature = "openai-compat")]
pub mod openai_compat;
#[cfg(feature = "gemini")]
pub mod gemini;
pub use config::{EmbeddingConfig, EmbeddingProvider};
pub use errors::EmbedError;
use async_trait::async_trait;
#[async_trait]
pub trait EmbeddingBackend: Send + Sync + std::fmt::Debug {
fn id(&self) -> &str;
fn dimension(&self) -> u16;
async fn embed(&self, texts: &[String]) -> Result<Vec<Vec<f32>>, EmbedError>;
}
#[cfg(feature = "fastembed-backend")]
pub use fastembed::FastembedBackend;
#[cfg(feature = "ollama")]
pub use ollama::OllamaBackend;
#[cfg(feature = "openai-compat")]
pub use openai_compat::OpenAICompatBackend;
#[cfg(feature = "gemini")]
pub use gemini::GeminiBackend;