SamplingHandler

Trait SamplingHandler 

Source
pub trait SamplingHandler: Send + Sync {
    // Required method
    fn create_message<'life0, 'async_trait>(
        &'life0 self,
        request: CreateMessageRequest,
    ) -> Pin<Box<dyn Future<Output = MCPResult<CreateMessageResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Sampling handler trait for LLM completions

Required Methods§

Source

fn create_message<'life0, 'async_trait>( &'life0 self, request: CreateMessageRequest, ) -> Pin<Box<dyn Future<Output = MCPResult<CreateMessageResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a message using sampling

Implementors§