pub struct BatchProvider<P> { /* private fields */ }Expand description
Batch provider that wraps any LLM provider with batching capabilities
Implementations§
Source§impl<P: LlmProvider + 'static> BatchProvider<P>
impl<P: LlmProvider + 'static> BatchProvider<P>
Sourcepub fn new(provider: P, config: BatchConfig) -> Self
pub fn new(provider: P, config: BatchConfig) -> Self
Create a new batch provider
Sourcepub async fn stats(&self) -> BatchStats
pub async fn stats(&self) -> BatchStats
Get current batch processing statistics
Trait Implementations§
Source§impl<P: LlmProvider + 'static> LlmProvider for BatchProvider<P>
impl<P: LlmProvider + 'static> LlmProvider for BatchProvider<P>
fn complete<'life0, 'async_trait>(
&'life0 self,
request: LlmRequest,
) -> Pin<Box<dyn Future<Output = Result<LlmResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<P> Freeze for BatchProvider<P>
impl<P> !RefUnwindSafe for BatchProvider<P>
impl<P> Send for BatchProvider<P>where
P: Send,
impl<P> Sync for BatchProvider<P>where
P: Sync,
impl<P> Unpin for BatchProvider<P>where
P: Unpin,
impl<P> !UnwindSafe for BatchProvider<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