pub struct BatchingTextEmbedder<E> { /* private fields */ }Expand description
Wrapper that splits large batches into fixed-size chunks before delegating.
Useful for rate-limited APIs or backends with memory constraints.
Implementations§
Trait Implementations§
Source§impl<E: Clone> Clone for BatchingTextEmbedder<E>
impl<E: Clone> Clone for BatchingTextEmbedder<E>
Source§fn clone(&self) -> BatchingTextEmbedder<E>
fn clone(&self) -> BatchingTextEmbedder<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E: Debug> Debug for BatchingTextEmbedder<E>
impl<E: Debug> Debug for BatchingTextEmbedder<E>
Source§impl<E: TextEmbedder> TextEmbedder for BatchingTextEmbedder<E>
impl<E: TextEmbedder> TextEmbedder for BatchingTextEmbedder<E>
Source§fn embed_texts(
&self,
texts: &[String],
mode: EmbedMode,
) -> Result<Vec<Vec<f32>>>
fn embed_texts( &self, texts: &[String], mode: EmbedMode, ) -> Result<Vec<Vec<f32>>>
Embed texts into vectors. Read more
Source§fn dimension(&self) -> Option<usize>
fn dimension(&self) -> Option<usize>
Optional: embedding dimension as returned by this embedder. Read more
Source§fn capabilities(&self) -> TextEmbedderCapabilities
fn capabilities(&self) -> TextEmbedderCapabilities
Optional: backend capability declaration. Read more
Auto Trait Implementations§
impl<E> Freeze for BatchingTextEmbedder<E>where
E: Freeze,
impl<E> RefUnwindSafe for BatchingTextEmbedder<E>where
E: RefUnwindSafe,
impl<E> Send for BatchingTextEmbedder<E>where
E: Send,
impl<E> Sync for BatchingTextEmbedder<E>where
E: Sync,
impl<E> Unpin for BatchingTextEmbedder<E>where
E: Unpin,
impl<E> UnsafeUnpin for BatchingTextEmbedder<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for BatchingTextEmbedder<E>where
E: UnwindSafe,
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