mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
fix: run formatter
This commit is contained in:
parent
337e2045bf
commit
151a2a8104
@ -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(),
|
||||
|
@ -993,7 +993,7 @@ impl From<ToolTypeDeserializer> 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)),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user