pub trait LlmClient: Send + Sync {
// Required methods
fn complete(
&self,
prompt: &str,
system: Option<&str>,
) -> impl Future<Output = Result<String, LlmError>> + Send;
fn embed(
&self,
text: &str,
) -> impl Future<Output = Result<Vec<f32>, LlmError>> + Send;
}Expand description
Trait for LLM providers (Anthropic, OpenAI, Ollama). Shared between mur-core and mur-commander.
Edition 2024 supports async fn in traits natively.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".