Skip to content

Commit

Permalink
Derive Copy for enums (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed Oct 10, 2023
1 parent dbde022 commit faaa89f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions async-openai/src/types/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub struct CreateEditResponse {
pub usage: Usage,
}

#[derive(Default, Debug, Serialize, Clone, PartialEq)]
#[derive(Default, Debug, Serialize, Clone, Copy, PartialEq)]
pub enum ImageSize {
#[serde(rename = "256x256")]
S256x256,
Expand All @@ -231,7 +231,7 @@ pub enum ImageSize {
S1024x1024,
}

#[derive(Debug, Serialize, Default, Clone, PartialEq)]
#[derive(Debug, Serialize, Default, Clone, Copy, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum ResponseFormat {
#[default]
Expand Down Expand Up @@ -345,7 +345,7 @@ pub enum ModerationInput {
StringArray(Vec<String>),
}

#[derive(Debug, Serialize, Default, Clone, PartialEq)]
#[derive(Debug, Serialize, Default, Clone, Copy, PartialEq)]
pub enum TextModerationModel {
#[default]
#[serde(rename = "text-moderation-latest")]
Expand Down Expand Up @@ -693,7 +693,7 @@ pub struct CreateEmbeddingResponse {
pub usage: EmbeddingUsage,
}

#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq)]
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum Role {
System,
Expand Down Expand Up @@ -904,7 +904,7 @@ pub struct AudioInput {
pub path: PathBuf,
}

#[derive(Debug, Serialize, Default, Clone, PartialEq)]
#[derive(Debug, Serialize, Default, Clone, Copy, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum AudioResponseFormat {
#[default]
Expand Down

0 comments on commit faaa89f

Please sign in to comment.