pub struct MockLLMHandler { /* private fields */ }
Expand description
Mock LLM handler for testing
This handler simulates an LLM by providing canned responses based on the input. Useful for testing and examples.
Implementations§
Trait Implementations§
Source§impl Clone for MockLLMHandler
impl Clone for MockLLMHandler
Source§fn clone(&self) -> MockLLMHandler
fn clone(&self) -> MockLLMHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MockLLMHandler
impl Debug for MockLLMHandler
Source§impl SamplingHandler for MockLLMHandler
impl SamplingHandler for MockLLMHandler
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 the server
Auto Trait Implementations§
impl Freeze for MockLLMHandler
impl RefUnwindSafe for MockLLMHandler
impl Send for MockLLMHandler
impl Sync for MockLLMHandler
impl Unpin for MockLLMHandler
impl UnwindSafe for MockLLMHandler
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