pub struct Batch {Show 19 fields
pub id: String,
pub endpoint: String,
pub errors: Option<Errors>,
pub input_file_id: String,
pub completion_window: String,
pub status: Status,
pub output_file_id: Option<String>,
pub error_file_id: Option<String>,
pub created_at: i64,
pub in_progress_at: Option<i64>,
pub expires_at: Option<i64>,
pub finalizing_at: Option<i64>,
pub completed_at: Option<i64>,
pub failed_at: Option<i64>,
pub expired_at: Option<i64>,
pub cancelling_at: Option<i64>,
pub cancelled_at: Option<i64>,
pub request_counts: Option<BatchRequestCounts>,
pub metadata: Option<Metadata>,
}Fields§
§id: String§endpoint: StringThe OpenAI API endpoint used by the batch.
errors: Option<Errors>§input_file_id: StringThe ID of the input file for the batch.
completion_window: StringThe time frame within which the batch should be processed.
status: StatusThe current status of the batch.
output_file_id: Option<String>The ID of the file containing the outputs of successfully executed requests.
error_file_id: Option<String>The ID of the file containing the outputs of requests with errors.
created_at: i64The Unix timestamp (in seconds) for when the batch was created.
in_progress_at: Option<i64>The Unix timestamp (in seconds) for when the batch started processing.
expires_at: Option<i64>The Unix timestamp (in seconds) for when the batch will expire.
finalizing_at: Option<i64>The Unix timestamp (in seconds) for when the batch started finalizing.
completed_at: Option<i64>The Unix timestamp (in seconds) for when the batch was completed.
failed_at: Option<i64>The Unix timestamp (in seconds) for when the batch failed.
expired_at: Option<i64>The Unix timestamp (in seconds) for when the batch expired.
cancelling_at: Option<i64>The Unix timestamp (in seconds) for when the batch started cancelling.
cancelled_at: Option<i64>The Unix timestamp (in seconds) for when the batch was cancelled.
request_counts: Option<BatchRequestCounts>§metadata: Option<Metadata>Implementations§
Source§impl Batch
impl Batch
Sourcepub fn builder() -> BatchBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> BatchBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building Batch.
On the builder, call .id(...), .endpoint(...), .errors(...)(optional), .input_file_id(...), .completion_window(...), .status(...), .output_file_id(...)(optional), .error_file_id(...)(optional), .created_at(...), .in_progress_at(...)(optional), .expires_at(...)(optional), .finalizing_at(...)(optional), .completed_at(...)(optional), .failed_at(...)(optional), .expired_at(...)(optional), .cancelling_at(...)(optional), .cancelled_at(...)(optional), .request_counts(...)(optional), .metadata(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Batch.