pub struct BatchChatRequest {
pub requests: Vec<ChatRequest>,
pub batch_config: Option<BatchOperationConfig>,
pub parallel_execution: bool,
pub fail_fast: bool,
pub timeout: Option<Duration>,
}Expand description
Request structure for batch chat operations
Fields§
§requests: Vec<ChatRequest>List of chat requests to process in batch
batch_config: Option<BatchOperationConfig>Batch operation configuration
parallel_execution: boolEnable parallel execution of requests
fail_fast: boolStop processing on first error
timeout: Option<Duration>Overall timeout for the entire batch
Implementations§
Source§impl BatchChatRequest
impl BatchChatRequest
Sourcepub fn new(requests: Vec<ChatRequest>) -> Self
pub fn new(requests: Vec<ChatRequest>) -> Self
Create a new batch chat request
Sourcepub fn with_config(self, config: BatchOperationConfig) -> Self
pub fn with_config(self, config: BatchOperationConfig) -> Self
Set batch configuration
Sourcepub fn with_parallel_execution(self, parallel: bool) -> Self
pub fn with_parallel_execution(self, parallel: bool) -> Self
Set parallel execution mode
Sourcepub fn with_fail_fast(self, fail_fast: bool) -> Self
pub fn with_fail_fast(self, fail_fast: bool) -> Self
Set fail-fast behavior
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set batch timeout
Sourcepub fn request_count(&self) -> usize
pub fn request_count(&self) -> usize
Get the number of requests in this batch
Trait Implementations§
Source§impl Clone for BatchChatRequest
impl Clone for BatchChatRequest
Source§fn clone(&self) -> BatchChatRequest
fn clone(&self) -> BatchChatRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchChatRequest
impl Debug for BatchChatRequest
Auto Trait Implementations§
impl Freeze for BatchChatRequest
impl RefUnwindSafe for BatchChatRequest
impl Send for BatchChatRequest
impl Sync for BatchChatRequest
impl Unpin for BatchChatRequest
impl UnsafeUnpin for BatchChatRequest
impl UnwindSafe for BatchChatRequest
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