pub struct Batch {Show 19 fields
pub id: String,
pub endpoint: String,
pub errors: Option<BatchErrors>,
pub input_file_id: String,
pub completion_window: String,
pub status: BatchStatus,
pub output_file_id: Option<String>,
pub error_file_id: Option<String>,
pub created_at: u64,
pub in_progress_at: Option<u64>,
pub expires_at: Option<u64>,
pub finalizing_at: Option<u64>,
pub completed_at: Option<u64>,
pub failed_at: Option<u64>,
pub expired_at: Option<u64>,
pub cancelling_at: Option<u64>,
pub cancelled_at: Option<u64>,
pub request_counts: Option<BatchRequestCounts>,
pub metadata: Option<Metadata>,
}
Fields§
§id: String
§endpoint: String
The OpenAI API endpoint used by the batch.
errors: Option<BatchErrors>
§input_file_id: String
The ID of the input file for the batch.
completion_window: String
The time frame within which the batch should be processed.
status: BatchStatus
The 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: u64
The Unix timestamp (in seconds) for when the batch was created.
in_progress_at: Option<u64>
The Unix timestamp (in seconds) for when the batch started processing.
expires_at: Option<u64>
The Unix timestamp (in seconds) for when the batch will expire.
finalizing_at: Option<u64>
The Unix timestamp (in seconds) for when the batch started finalizing.
completed_at: Option<u64>
The Unix timestamp (in seconds) for when the batch was completed.
failed_at: Option<u64>
The Unix timestamp (in seconds) for when the batch failed.
expired_at: Option<u64>
The Unix timestamp (in seconds) for when the batch expired.
cancelling_at: Option<u64>
The Unix timestamp (in seconds) for when the batch started cancelling.
cancelled_at: Option<u64>
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
.