This commit is contained in:
Wauplin 2024-10-02 12:14:39 +02:00
parent aae6db9cd0
commit 337e2045bf
No known key found for this signature in database
GPG Key ID: 9838FE02BECE1A02

View File

@ -993,9 +993,7 @@ impl From<ToolTypeDeserializer> for ToolChoice {
ToolTypeDeserializer::String(s) => match s.as_str() { ToolTypeDeserializer::String(s) => match s.as_str() {
"none" => ToolChoice(Some(ToolType::NoTool)), "none" => ToolChoice(Some(ToolType::NoTool)),
"auto" => ToolChoice(Some(ToolType::OneOf)), "auto" => ToolChoice(Some(ToolType::OneOf)),
_ => ToolChoice(Some(ToolType::Function(FunctionName { _ => ToolChoice(Some(ToolType::Function(FunctionName{name: s}))),
name: s
} ))),
}, },
ToolTypeDeserializer::ToolType(tool_type) => ToolChoice(Some(tool_type)), ToolTypeDeserializer::ToolType(tool_type) => ToolChoice(Some(tool_type)),
} }