Skip to content
Open

Main #42

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ pub struct ParamBuilder {
name: String,
property_type: String,
description: String,
items: Option<Box<ParameterProperty>>,
items: Option<Box<ParametersSchema>>,
enum_list: Option<Vec<String>>,
}

Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/chat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Box<ParameterProperty>>,
pub items: Option<Box<ParametersSchema>>,
/// 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<Vec<String>>,
Expand Down