Skip to content

Commit

Permalink
Merge pull request #698 from dcSpark/nico/fix_tool_matching_fn
Browse files Browse the repository at this point in the history
minor update: tool matching
  • Loading branch information
nicarq authored Dec 6, 2024
2 parents 7d96974 + 4e5cb77 commit 7ea3422
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ impl GenericInferenceChain {

// 6) Call workflow or tooling
// Find the ShinkaiTool that has a tool with the function name
let shinkai_tool = tools.iter().find(|tool| tool.name() == function_call.name);
let shinkai_tool = tools.iter().find(|tool| tool.name() == function_call.name || tool.tool_router_key() == function_call.tool_router_key.clone().unwrap_or_default());
if shinkai_tool.is_none() {
eprintln!("Function not found: {}", function_call.name);
return Err(LLMProviderError::FunctionNotFound(function_call.name.clone()));
Expand Down

0 comments on commit 7ea3422

Please sign in to comment.