fix: run formatter

This commit is contained in:
David Holtz 2024-10-02 13:15:06 +00:00
parent 337e2045bf
commit 151a2a8104
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ impl ToolGrammar {
// if tools are provided and no tool_choice we default to the OneOf // if tools are provided and no tool_choice we default to the OneOf
let tools_to_use = match tool_choice { let tools_to_use = match tool_choice {
ToolType::Function ( function ) => { ToolType::Function(function) => {
vec![Self::find_tool_by_name(&tools, &function.name)?] vec![Self::find_tool_by_name(&tools, &function.name)?]
} }
ToolType::OneOf => tools.clone(), ToolType::OneOf => tools.clone(),

View File

@ -993,7 +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{name: s}))), _ => ToolChoice(Some(ToolType::Function(FunctionName { name: s }))),
}, },
ToolTypeDeserializer::ToolType(tool_type) => ToolChoice(Some(tool_type)), ToolTypeDeserializer::ToolType(tool_type) => ToolChoice(Some(tool_type)),
} }