From 151a2a8104f1f8fea98c752bec8347f75bd09d0d Mon Sep 17 00:00:00 2001 From: David Holtz Date: Wed, 2 Oct 2024 13:15:06 +0000 Subject: [PATCH] fix: run formatter --- router/src/infer/tool_grammar.rs | 2 +- router/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)), }