pub struct FakeEmbeddings { /* private fields */ }Expand description
Deterministic embeddings for testing. Generates vectors based on a simple hash of the input text.
Implementations§
Trait Implementations§
Source§impl Default for FakeEmbeddings
impl Default for FakeEmbeddings
Source§impl Embeddings for FakeEmbeddings
impl Embeddings for FakeEmbeddings
Source§fn embed_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, SynapseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn embed_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, SynapseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Embed multiple texts (for batch document embedding).
Auto Trait Implementations§
impl Freeze for FakeEmbeddings
impl RefUnwindSafe for FakeEmbeddings
impl Send for FakeEmbeddings
impl Sync for FakeEmbeddings
impl Unpin for FakeEmbeddings
impl UnsafeUnpin for FakeEmbeddings
impl UnwindSafe for FakeEmbeddings
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