pub struct BatchStatus {
pub batch_id: BatchId,
pub file_id: Option<FileId>,
pub file_name: Option<String>,
pub total_requests: i64,
pub pending_requests: i64,
pub in_progress_requests: i64,
pub completed_requests: i64,
pub failed_requests: i64,
pub canceled_requests: i64,
pub started_at: Option<DateTime<Utc>>,
pub failed_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
}Expand description
Status information for a batch, computed from its executions.
Fields§
§batch_id: BatchId§file_id: Option<FileId>§file_name: Option<String>§total_requests: i64§pending_requests: i64§in_progress_requests: i64§completed_requests: i64§failed_requests: i64§canceled_requests: i64§started_at: Option<DateTime<Utc>>§failed_at: Option<DateTime<Utc>>§created_at: DateTime<Utc>Implementations§
Source§impl BatchStatus
impl BatchStatus
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Check if the batch has finished (all requests in terminal state).
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the batch is still running.
Sourcepub fn openai_status(&self) -> &'static str
pub fn openai_status(&self) -> &'static str
Get OpenAI-compatible status string. Maps internal state to OpenAI’s status values:
- “validating” - batch just created, no requests started yet
- “in_progress” - batch is being processed
- “finalizing” - nearly all requests done (95%+ complete)
- “completed” - all requests in terminal state and at least one succeeded
- “failed” - all requests in terminal state and all failed
- “cancelled” - all requests cancelled
Trait Implementations§
Source§impl Clone for BatchStatus
impl Clone for BatchStatus
Source§fn clone(&self) -> BatchStatus
fn clone(&self) -> BatchStatus
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 BatchStatus
impl Debug for BatchStatus
Auto Trait Implementations§
impl Freeze for BatchStatus
impl RefUnwindSafe for BatchStatus
impl Send for BatchStatus
impl Sync for BatchStatus
impl Unpin for BatchStatus
impl UnsafeUnpin for BatchStatus
impl UnwindSafe for BatchStatus
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