Skip to content

Commit

Permalink
Add derive default
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongri Jin committed Dec 30, 2023
1 parent d192774 commit 4012534
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/v1/chat_completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub enum JSONSchemaType {
Boolean,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct JSONSchemaDefine {
#[serde(rename = "type")]
pub schema_type: Option<JSONSchemaType>,
Expand All @@ -197,19 +197,6 @@ pub struct JSONSchemaDefine {
pub items: Option<Box<JSONSchemaDefine>>,
}

impl Default for JSONSchemaDefine {
fn default() -> Self {
Self {
schema_type: None,
description: None,
enum_values: None,
properties: None,
required: None,
items: None,
}
}
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct FunctionParameters {
#[serde(rename = "type")]
Expand Down

0 comments on commit 4012534

Please sign in to comment.