From d4f53bf6bb036247484a07e4f1fe546ad2c28014 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 6 Mar 2025 14:31:46 +0000 Subject: [PATCH] fix: ruff check --- application/agents/tools/tool_action_parser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/agents/tools/tool_action_parser.py b/application/agents/tools/tool_action_parser.py index 4d894d1a..c7da5a4c 100644 --- a/application/agents/tools/tool_action_parser.py +++ b/application/agents/tools/tool_action_parser.py @@ -1,4 +1,7 @@ import json +import logging + +logger = logging.getLogger(__name__) class ToolActionParser: @@ -20,6 +23,7 @@ class ToolActionParser: tool_id = call["function"]["name"].split("_")[-1] action_name = call["function"]["name"].rsplit("_", 1)[0] except (KeyError, TypeError) as e: + logger.error(f"Error parsing OpenAI LLM call: {e}") return None, None, None else: try: @@ -27,6 +31,7 @@ class ToolActionParser: tool_id = call.function.name.split("_")[-1] action_name = call.function.name.rsplit("_", 1)[0] except (AttributeError, TypeError) as e: + logger.error(f"Error parsing OpenAI LLM call: {e}") return None, None, None return tool_id, action_name, call_args