pub struct MockLlm { /* private fields */ }Available on crate feature
models only.Expand description
A mock LLM implementation for testing without real API calls.
Returns pre-configured responses in order when generate_content is called.
Implementations§
Trait Implementations§
Source§impl Llm for MockLlm
impl Llm for MockLlm
Source§fn generate_content<'life0, 'async_trait>(
&'life0 self,
_req: LlmRequest,
_stream: bool,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<LlmResponse, AdkError>> + Send>>, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
MockLlm: 'async_trait,
fn generate_content<'life0, 'async_trait>(
&'life0 self,
_req: LlmRequest,
_stream: bool,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<LlmResponse, AdkError>> + Send>>, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
MockLlm: 'async_trait,
Generates content from the given request, optionally streaming.
Source§fn schema_adapter(&self) -> &dyn SchemaAdapter
fn schema_adapter(&self) -> &dyn SchemaAdapter
Returns the schema adapter for this provider. Read more
Auto Trait Implementations§
impl Freeze for MockLlm
impl RefUnwindSafe for MockLlm
impl Send for MockLlm
impl Sync for MockLlm
impl Unpin for MockLlm
impl UnsafeUnpin for MockLlm
impl UnwindSafe for MockLlm
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