diff --git a/router/src/infer/tool_grammar.rs b/router/src/infer/tool_grammar.rs index 62b7422f..cc9bf31d 100644 --- a/router/src/infer/tool_grammar.rs +++ b/router/src/infer/tool_grammar.rs @@ -53,7 +53,7 @@ impl ToolGrammar { // if tools are provided and no tool_choice we default to the OneOf let tools_to_use = match tool_choice { - ToolType::Function ( function ) => { + ToolType::Function(function) => { vec![Self::find_tool_by_name(&tools, &function.name)?] } ToolType::OneOf => tools.clone(), diff --git a/router/src/lib.rs b/router/src/lib.rs index e4c54ff9..ed74aa61 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -993,7 +993,7 @@ impl From for ToolChoice { ToolTypeDeserializer::String(s) => match s.as_str() { "none" => ToolChoice(Some(ToolType::NoTool)), "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)), }