Skip to main content

LLMClientDyn

Trait LLMClientDyn 

Source
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§

Source

fn completion( &self, completion: Completion, ) -> Pin<Box<dyn Future<Output = Result<CompletionResponse>> + Send + '_>>

Provided Methods§

Source

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>

Source§

async fn completion(&self, completion: Completion) -> Result<CompletionResponse>

Source§

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".

Implementors§