pub struct MockBackend { /* private fields */ }Expand description
Fixed-response backend for unit tests.
Implementations§
Trait Implementations§
Source§impl CompletionBackend for MockBackend
impl CompletionBackend for MockBackend
Source§fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_model: &'life1 str,
_system: &'life2 str,
_user: &'life3 str,
_max_tokens: u32,
) -> Pin<Box<dyn Future<Output = SummarizerResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_model: &'life1 str,
_system: &'life2 str,
_user: &'life3 str,
_max_tokens: u32,
) -> Pin<Box<dyn Future<Output = SummarizerResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Run a single completion with system and user prompts.
Auto Trait Implementations§
impl Freeze for MockBackend
impl RefUnwindSafe for MockBackend
impl Send for MockBackend
impl Sync for MockBackend
impl Unpin for MockBackend
impl UnsafeUnpin for MockBackend
impl UnwindSafe for MockBackend
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