openai_struct/models/
batch.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14/// .
15#[derive(Debug, Serialize, Deserialize)]
16pub struct Batch {
17    /// The Unix timestamp (in seconds) for when the batch was cancelled.
18    #[serde(rename = "cancelled_at")]
19    pub cancelled_at: Option<i32>,
20    /// The Unix timestamp (in seconds) for when the batch started cancelling.
21    #[serde(rename = "cancelling_at")]
22    pub cancelling_at: Option<i32>,
23    /// The Unix timestamp (in seconds) for when the batch was completed.
24    #[serde(rename = "completed_at")]
25    pub completed_at: Option<i32>,
26    /// The time frame within which the batch should be processed.
27    #[serde(rename = "completion_window")]
28    pub completion_window: String,
29    /// The Unix timestamp (in seconds) for when the batch was created.
30    #[serde(rename = "created_at")]
31    pub created_at: i32,
32    /// The OpenAI API endpoint used by the batch.
33    #[serde(rename = "endpoint")]
34    pub endpoint: String,
35    /// The ID of the file containing the outputs of requests with errors.
36    #[serde(rename = "error_file_id")]
37    pub error_file_id: Option<String>,
38    #[serde(rename = "errors")]
39    pub errors: Option<crate::models::BatchErrors>,
40    /// The Unix timestamp (in seconds) for when the batch expired.
41    #[serde(rename = "expired_at")]
42    pub expired_at: Option<i32>,
43    /// The Unix timestamp (in seconds) for when the batch will expire.
44    #[serde(rename = "expires_at")]
45    pub expires_at: Option<i32>,
46    /// The Unix timestamp (in seconds) for when the batch failed.
47    #[serde(rename = "failed_at")]
48    pub failed_at: Option<i32>,
49    /// The Unix timestamp (in seconds) for when the batch started finalizing.
50    #[serde(rename = "finalizing_at")]
51    pub finalizing_at: Option<i32>,
52    #[serde(rename = "id")]
53    pub id: String,
54    /// The Unix timestamp (in seconds) for when the batch started processing.
55    #[serde(rename = "in_progress_at")]
56    pub in_progress_at: Option<i32>,
57    /// The ID of the input file for the batch.
58    #[serde(rename = "input_file_id")]
59    pub input_file_id: String,
60    #[serde(rename = "metadata")]
61    pub metadata: Option<crate::models::Metadata>,
62    /// The object type, which is always `batch`.
63    #[serde(rename = "object")]
64    pub object: String,
65    /// The ID of the file containing the outputs of successfully executed requests.
66    #[serde(rename = "output_file_id")]
67    pub output_file_id: Option<String>,
68    #[serde(rename = "request_counts")]
69    pub request_counts: Option<crate::models::BatchRequestCounts>,
70    /// The current status of the batch.
71    #[serde(rename = "status")]
72    pub status: String,
73}