manx_cli/rag/providers/
mod.rs1use anyhow::Result;
2
3pub mod custom;
4pub mod hash;
5pub mod huggingface;
6pub mod ollama;
7pub mod onnx;
8pub mod openai;
9
10#[async_trait::async_trait]
12pub trait EmbeddingProvider {
13 async fn embed_text(&self, text: &str) -> Result<Vec<f32>>;
15
16 async fn get_dimension(&self) -> Result<usize>;
18
19 async fn health_check(&self) -> Result<()>;
21
22 fn get_info(&self) -> ProviderInfo;
24}
25
26#[derive(Debug, Clone)]
28pub struct ProviderInfo {
29 pub name: String,
30 pub provider_type: String,
31 pub model_name: Option<String>,
32 pub description: String,
33 pub max_input_length: Option<usize>,
34}