pub trait LLMClientDyn: Send + Sync {
// Required method
fn completion(
&self,
completion: Completion,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse>> + Send + '_>>;
// Provided method
fn fork_for_agent(&self) -> Option<Arc<dyn LLMClientDyn>> { ... }
}Required Methods§
fn completion( &self, completion: Completion, ) -> Pin<Box<dyn Future<Output = Result<CompletionResponse>> + Send + '_>>
Provided Methods§
Sourcefn fork_for_agent(&self) -> Option<Arc<dyn LLMClientDyn>>
fn fork_for_agent(&self) -> Option<Arc<dyn LLMClientDyn>>
Fork mutable routing state for an independently progressing agent while retaining shared
provider clients and run-wide route availability. Stateless clients return None and may
safely be shared by Arc.
Trait Implementations§
Source§impl LLMClient for Box<dyn LLMClientDyn>
impl LLMClient for Box<dyn LLMClientDyn>
async fn completion(&self, completion: Completion) -> Result<CompletionResponse>
fn into_arc(self) -> Arc<dyn LLMClientDyn> ⓘwhere
Self: Sized + 'static,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".