pub struct MockProvider { /* private fields */ }Expand description
Mock LLM provider for tests. Supply a sequence of responses.
Implementations§
Trait Implementations§
Source§impl StreamProvider for MockProvider
impl StreamProvider for MockProvider
Source§fn provider_id(&self) -> &str
fn provider_id(&self) -> &str
Short, stable identifier for this provider type. Read more
Source§fn stream<'life0, 'async_trait>(
&'life0 self,
_config: StreamConfig,
tx: UnboundedSender<StreamEvent>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<Message, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream<'life0, 'async_trait>(
&'life0 self,
_config: StreamConfig,
tx: UnboundedSender<StreamEvent>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<Message, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream a completion. Send events through
tx in real time.
Returns the final, fully-assembled assistant Message after the stream ends. Read moreAuto Trait Implementations§
impl !Freeze for MockProvider
impl RefUnwindSafe for MockProvider
impl Send for MockProvider
impl Sync for MockProvider
impl Unpin for MockProvider
impl UnsafeUnpin for MockProvider
impl UnwindSafe for MockProvider
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