pub struct ConcurrentBatchManager { /* private fields */ }Expand description
并发批量管理器
将大批次文本拆分为多个小批次,并发发送 Embedding API 请求。 内置重试、限流、进度回调。
Implementations§
Source§impl ConcurrentBatchManager
impl ConcurrentBatchManager
pub fn new( embedder: Box<dyn EmbeddingModel>, batch_size: usize, max_concurrency: usize, ) -> Self
pub fn with_retry(self, retry: RetryConfig) -> Self
Auto Trait Implementations§
impl Freeze for ConcurrentBatchManager
impl !RefUnwindSafe for ConcurrentBatchManager
impl Send for ConcurrentBatchManager
impl Sync for ConcurrentBatchManager
impl Unpin for ConcurrentBatchManager
impl UnsafeUnpin for ConcurrentBatchManager
impl !UnwindSafe for ConcurrentBatchManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more