SamplingHandler

Trait SamplingHandler 

Source
pub trait SamplingHandler: Send + Sync {
    // Required method
    fn create_message<'life0, 'async_trait>(
        &'life0 self,
        params: CreateMessageParams,
        extra: RequestHandlerExtra,
    ) -> Pin<Box<dyn Future<Output = Result<CreateMessageResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Handler for message sampling (LLM operations).

Required Methods§

Source

fn create_message<'life0, 'async_trait>( &'life0 self, params: CreateMessageParams, extra: RequestHandlerExtra, ) -> Pin<Box<dyn Future<Output = Result<CreateMessageResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a message using the language model.

Implementors§