1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* OpenAI API
*
* The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
*
* The version of the OpenAPI document: 2.3.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// FilePurpose : The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets
/// The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FilePurpose {
#[serde(rename = "assistants")]
Assistants,
#[serde(rename = "batch")]
Batch,
#[serde(rename = "fine-tune")]
FineTune,
#[serde(rename = "vision")]
Vision,
#[serde(rename = "user_data")]
UserData,
#[serde(rename = "evals")]
Evals,
}
impl std::fmt::Display for FilePurpose {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Assistants => write!(f, "assistants"),
Self::Batch => write!(f, "batch"),
Self::FineTune => write!(f, "fine-tune"),
Self::Vision => write!(f, "vision"),
Self::UserData => write!(f, "user_data"),
Self::Evals => write!(f, "evals"),
}
}
}
impl Default for FilePurpose {
fn default() -> FilePurpose {
Self::Assistants
}
}