use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FilePurpose {
#[serde(rename = "fine-tune")]
FineTune,
#[serde(rename = "batch")]
Batch,
#[serde(rename = "ocr")]
Ocr,
}
impl std::fmt::Display for FilePurpose {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::FineTune => write!(f, "fine-tune"),
Self::Batch => write!(f, "batch"),
Self::Ocr => write!(f, "ocr"),
}
}
}
impl Default for FilePurpose {
fn default() -> FilePurpose {
Self::FineTune
}
}