pub struct MockLLMClient { /* private fields */ }Expand description
Mock LLM client for testing
Implementations§
Source§impl MockLLMClient
impl MockLLMClient
Sourcepub fn with_response(response: impl Into<String>) -> Self
pub fn with_response(response: impl Into<String>) -> Self
Create a mock client with a custom response
Sourcepub fn with_tool_calls(tool_calls: Vec<ToolCall>) -> Self
pub fn with_tool_calls(tool_calls: Vec<ToolCall>) -> Self
Create a mock client with tool calls
Trait Implementations§
Source§impl Clone for MockLLMClient
impl Clone for MockLLMClient
Source§fn clone(&self) -> MockLLMClient
fn clone(&self) -> MockLLMClient
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 MockLLMClient
impl Debug for MockLLMClient
Source§impl Default for MockLLMClient
impl Default for MockLLMClient
Source§impl LLMClient for MockLLMClient
impl LLMClient for MockLLMClient
Source§fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
_messages: Vec<Message>,
_tools: Vec<ToolDefinition>,
_model: Option<&'life1 str>,
_json_mode: bool,
) -> Pin<Box<dyn Future<Output = GentResult<LLMResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
_messages: Vec<Message>,
_tools: Vec<ToolDefinition>,
_model: Option<&'life1 str>,
_json_mode: bool,
) -> Pin<Box<dyn Future<Output = GentResult<LLMResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a chat request to the LLM Read more
Auto Trait Implementations§
impl Freeze for MockLLMClient
impl RefUnwindSafe for MockLLMClient
impl Send for MockLLMClient
impl Sync for MockLLMClient
impl Unpin for MockLLMClient
impl UnwindSafe for MockLLMClient
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