pub struct NoopEmbedding;Expand description
No-op embedding provider that returns empty vectors
Trait Implementations§
Source§impl EmbeddingProvider for NoopEmbedding
impl EmbeddingProvider for NoopEmbedding
Source§fn dimensions(&self) -> usize
fn dimensions(&self) -> usize
Embedding dimensions
Source§fn embed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn embed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Embed a batch of texts into vectors
Auto Trait Implementations§
impl Freeze for NoopEmbedding
impl RefUnwindSafe for NoopEmbedding
impl Send for NoopEmbedding
impl Sync for NoopEmbedding
impl Unpin for NoopEmbedding
impl UnsafeUnpin for NoopEmbedding
impl UnwindSafe for NoopEmbedding
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