pub struct BatchChatResponse {
pub results: Vec<BatchResult>,
pub total_requests: usize,
pub successful_requests: usize,
pub failed_requests: usize,
pub execution_time_ms: u64,
pub throughput_requests_per_second: f64,
pub batch_optimizations: Option<Vec<String>>,
pub errors: Vec<String>,
}Expand description
Response structure for batch chat operations
Fields§
§results: Vec<BatchResult>Results for each request in the batch
total_requests: usizeTotal number of requests processed
successful_requests: usizeNumber of successful requests
failed_requests: usizeNumber of failed requests
execution_time_ms: u64Total execution time in milliseconds
throughput_requests_per_second: f64Throughput in requests per second
batch_optimizations: Option<Vec<String>>List of optimizations applied during batch processing
errors: Vec<String>Error messages from batch processing
Implementations§
Source§impl BatchChatResponse
impl BatchChatResponse
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Calculate success rate as percentage
Sourcepub fn all_successful(&self) -> bool
pub fn all_successful(&self) -> bool
Check if all requests were successful
Sourcepub fn has_failures(&self) -> bool
pub fn has_failures(&self) -> bool
Check if any requests failed
Sourcepub fn successful_results(&self) -> Vec<&Value>
pub fn successful_results(&self) -> Vec<&Value>
Get successful results only
Sourcepub fn error_results(&self) -> Vec<&BatchError>
pub fn error_results(&self) -> Vec<&BatchError>
Get error results only
Trait Implementations§
Source§impl Clone for BatchChatResponse
impl Clone for BatchChatResponse
Source§fn clone(&self) -> BatchChatResponse
fn clone(&self) -> BatchChatResponse
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 Debug for BatchChatResponse
impl Debug for BatchChatResponse
Auto Trait Implementations§
impl Freeze for BatchChatResponse
impl RefUnwindSafe for BatchChatResponse
impl Send for BatchChatResponse
impl Sync for BatchChatResponse
impl Unpin for BatchChatResponse
impl UnwindSafe for BatchChatResponse
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