openai_struct/models/
create_file_request.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/// # on openapi.yaml
15///
16/// ```yaml
17/// CreateFileRequest:
18///   type: object
19///   additionalProperties: false
20///   properties:
21///     file:
22///       description: |
23///         The File object (not file name) to be uploaded.
24///       type: string
25///       format: binary
26///     purpose:
27///       description: >
28///         The intended purpose of the uploaded file. One of: - `assistants`:
29///         Used in the Assistants API - `batch`: Used in the Batch API -
30///         `fine-tune`: Used for fine-tuning - `vision`: Images used for vision
31///         fine-tuning - `user_data`: Flexible file type for any purpose -
32///         `evals`: Used for eval data sets
33///       type: string
34///       enum:
35///         - assistants
36///         - batch
37///         - fine-tune
38///         - vision
39///         - user_data
40///         - evals
41///   required:
42///     - file
43///     - purpose
44/// ```
45#[derive(Debug, Serialize, Deserialize)]
46pub struct CreateFileRequest {
47    /// The File object (not file name) to be uploaded.
48    #[serde(rename = "file")]
49    pub file: Vec<u8>,
50    /// The intended purpose of the uploaded file. One of:
51    /// - `assistants`: Used in the Assistants API
52    /// - `batch`: Used in the Batch API
53    /// - `fine-tune`: Used for fine-tuning
54    /// - `vision`: Images used for vision fine-tuning
55    /// - `user_data`: Flexible file type for any purpose
56    /// - `evals`: Used for eval data sets
57    #[serde(rename = "purpose")]
58    pub purpose: String,
59}