From 438a940660e16118cfa8dbc6622b259ecd3e7d4e Mon Sep 17 00:00:00 2001 From: Jonathan Lucas Date: Tue, 3 Jun 2025 17:36:26 -0500 Subject: [PATCH] Updated filtering --- openai_compatible_inference_bot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openai_compatible_inference_bot.py b/openai_compatible_inference_bot.py index 0f00476..1692a2d 100644 --- a/openai_compatible_inference_bot.py +++ b/openai_compatible_inference_bot.py @@ -162,8 +162,7 @@ class OpenAICompatibleInferenceBot(InferenceBot): function_args_str = function_to_call.arguments logging.info(f"Attempting to call tool: {function_name} with args: {function_args_str}") - - if function_name not in self.functions: + if function_name not in [f["function"]["name"] for f in self.functions]: logging.warning(f"Tool function {function_name} not found in available functions.") tool_results_for_model.append({ "role": "tool",