diff --git a/src/v1/chat_completion.rs b/src/v1/chat_completion.rs index cf94c8b..0a551ae 100644 --- a/src/v1/chat_completion.rs +++ b/src/v1/chat_completion.rs @@ -10,6 +10,7 @@ use crate::v1::common; pub enum ToolChoiceType { None, Auto, + Required, ToolChoice { tool: Tool }, } @@ -265,6 +266,7 @@ where match value { Some(ToolChoiceType::None) => serializer.serialize_str("none"), Some(ToolChoiceType::Auto) => serializer.serialize_str("auto"), + Some(ToolChoiceType::Required) => serializer.serialize_str("required"), Some(ToolChoiceType::ToolChoice { tool }) => { let mut map = serializer.serialize_map(Some(2))?; map.serialize_entry("type", &tool.r#type)?;