pub struct DelegatingSamplingHandler { /* private fields */ }
Expand description
Default implementation that delegates to external MCP servers
This is the “batteries included” approach - it connects to LLM MCP servers but maintains perfect protocol compliance.
Implementations§
Source§impl DelegatingSamplingHandler
impl DelegatingSamplingHandler
Sourcepub fn new(
llm_clients: Vec<Arc<dyn LLMServerClient>>,
user_handler: Arc<dyn UserInteractionHandler>,
) -> Self
pub fn new( llm_clients: Vec<Arc<dyn LLMServerClient>>, user_handler: Arc<dyn UserInteractionHandler>, ) -> Self
Create new handler with LLM server clients
Trait Implementations§
Source§impl Debug for DelegatingSamplingHandler
impl Debug for DelegatingSamplingHandler
Source§impl SamplingHandler for DelegatingSamplingHandler
impl SamplingHandler for DelegatingSamplingHandler
Source§fn handle_create_message<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<CreateMessageResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_create_message<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<CreateMessageResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a sampling/createMessage request from a server Read more
Auto Trait Implementations§
impl Freeze for DelegatingSamplingHandler
impl !RefUnwindSafe for DelegatingSamplingHandler
impl Send for DelegatingSamplingHandler
impl Sync for DelegatingSamplingHandler
impl Unpin for DelegatingSamplingHandler
impl !UnwindSafe for DelegatingSamplingHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more