pub struct EmbeddingBatchProvider<P> { /* private fields */ }Expand description
Batch provider for embeddings
Implementations§
Source§impl<P: EmbeddingProvider + 'static> EmbeddingBatchProvider<P>
impl<P: EmbeddingProvider + 'static> EmbeddingBatchProvider<P>
Sourcepub fn new(provider: P, config: BatchConfig) -> Self
pub fn new(provider: P, config: BatchConfig) -> Self
Create a new embedding batch provider
Sourcepub async fn stats(&self) -> BatchStats
pub async fn stats(&self) -> BatchStats
Get current batch processing statistics
Trait Implementations§
Source§impl<P: EmbeddingProvider + 'static> EmbeddingProvider for EmbeddingBatchProvider<P>
impl<P: EmbeddingProvider + 'static> EmbeddingProvider for EmbeddingBatchProvider<P>
fn embed<'life0, 'async_trait>(
&'life0 self,
request: EmbeddingRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<P> Freeze for EmbeddingBatchProvider<P>
impl<P> !RefUnwindSafe for EmbeddingBatchProvider<P>
impl<P> Send for EmbeddingBatchProvider<P>where
P: Send,
impl<P> Sync for EmbeddingBatchProvider<P>where
P: Sync,
impl<P> Unpin for EmbeddingBatchProvider<P>where
P: Unpin,
impl<P> !UnwindSafe for EmbeddingBatchProvider<P>
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