Skip to main content

LLMClient

Trait LLMClient 

Source
pub trait LLMClient: Send + Sync {
    // Required method
    fn completion(
        &self,
        completion: Completion,
    ) -> impl Future<Output = Result<CompletionResponse>> + Send;

    // Provided method
    fn into_arc(self) -> Arc<dyn LLMClientDyn>
       where Self: Sized + 'static { ... }
}

Required Methods§

Source

fn completion( &self, completion: Completion, ) -> impl Future<Output = Result<CompletionResponse>> + Send

Provided Methods§

Source

fn into_arc(self) -> Arc<dyn LLMClientDyn>
where Self: Sized + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LLMClient for Box<dyn LLMClientDyn>

Source§

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

Source§

impl LLMClient for Client

Source§

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

Source§

impl LLMClient for Client

Source§

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

Source§

impl LLMClient for Client

Source§

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

Source§

impl LLMClient for CompletionsClient

Source§

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

Implementors§