openai_struct/models/open_ai_file.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/// pub OpenAiFile : The `File` object represents a document that has been uploaded to OpenAI.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct OpenAiFile {
18 /// The size of the file, in bytes.
19 #[serde(rename = "bytes")]
20 pub bytes: i32,
21 /// The Unix timestamp (in seconds) for when the file was created.
22 #[serde(rename = "created_at")]
23 pub created_at: i32,
24 /// The Unix timestamp (in seconds) for when the file will expire.
25 #[serde(rename = "expires_at")]
26 pub expires_at: Option<i32>,
27 /// The name of the file.
28 #[serde(rename = "filename")]
29 pub filename: String,
30 /// The file identifier, which can be referenced in the API endpoints.
31 #[serde(rename = "id")]
32 pub id: String,
33 /// The object type, which is always `file`.
34 #[serde(rename = "object")]
35 pub object: String,
36 /// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.
37 #[serde(rename = "purpose")]
38 pub purpose: String,
39 /// Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
40 #[serde(rename = "status")]
41 pub status: String,
42 /// Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.
43 #[serde(rename = "status_details")]
44 pub status_details: Option<String>,
45}