From 0706b2ff761e815cedaa70e2188b90657bd80732 Mon Sep 17 00:00:00 2001 From: User Date: Thu, 22 May 2025 18:38:42 +0200 Subject: [PATCH] refactor: change items type from ParameterProperty to ParametersSchema in ParamBuilder and ParameterProperty --- src/builder.rs | 6 +++--- src/chat/mod.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index 416c511..3974ae1 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -674,7 +674,7 @@ pub struct ParamBuilder { name: String, property_type: String, description: String, - items: Option>, + items: Option>, enum_list: Option>, } @@ -703,8 +703,8 @@ impl ParamBuilder { } /// Sets the array item type for array parameters - pub fn items(mut self, item_property: ParameterProperty) -> Self { - self.items = Some(Box::new(item_property)); + pub fn items(mut self, schema_property: ParametersSchema) -> Self { + self.items = Some(Box::new(schema_property)); self } diff --git a/src/chat/mod.rs b/src/chat/mod.rs index cdfe2b9..cb7a9b0 100644 --- a/src/chat/mod.rs +++ b/src/chat/mod.rs @@ -90,7 +90,7 @@ pub struct ParameterProperty { pub description: String, /// When type is "array", this defines the type of the array items #[serde(skip_serializing_if = "Option::is_none")] - pub items: Option>, + pub items: Option>, /// When type is "enum", this defines the possible values for the parameter #[serde(skip_serializing_if = "Option::is_none", rename = "enum")] pub enum_list: Option>,