pub trait DaemonClient: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn is_available(&self) -> bool;
fn embed(
&self,
text: &str,
request_id: &str,
) -> Result<Vec<f32>, DaemonError>;
fn embed_batch(
&self,
texts: &[&str],
request_id: &str,
) -> Result<Vec<Vec<f32>>, DaemonError>;
fn rerank(
&self,
query: &str,
documents: &[&str],
request_id: &str,
) -> Result<Vec<f32>, DaemonError>;
}Expand description
Abstract daemon client.
Concrete transports (e.g. UDS/HTTP) are implemented by host applications.