pub struct MockEmbeddings { /* private fields */ }
Expand description
A simple mock embedding model for testing
Implementations§
Trait Implementations§
Source§impl Embeddings for MockEmbeddings
impl Embeddings for MockEmbeddings
Source§fn embed_query<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Embedding>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn embed_query<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Embedding>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Embed a single text
Source§fn model_name(&self) -> &str
fn model_name(&self) -> &str
Get the model name
Source§fn model_type(&self) -> &str
fn model_type(&self) -> &str
Get the model type
Auto Trait Implementations§
impl Freeze for MockEmbeddings
impl RefUnwindSafe for MockEmbeddings
impl Send for MockEmbeddings
impl Sync for MockEmbeddings
impl Unpin for MockEmbeddings
impl UnwindSafe for MockEmbeddings
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