From cebcd454c289a1c64b457e685dfa5ec1b494e9cc Mon Sep 17 00:00:00 2001 From: harshalmore31 Date: Thu, 17 Jul 2025 22:02:48 +0530 Subject: [PATCH] cleanup --- swarms/tools/base_tool.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/swarms/tools/base_tool.py b/swarms/tools/base_tool.py index 538cf729..af08f11e 100644 --- a/swarms/tools/base_tool.py +++ b/swarms/tools/base_tool.py @@ -2262,16 +2262,15 @@ class BaseTool(BaseModel): api_response = json.loads(api_response) except json.JSONDecodeError as e: self._log_if_verbose( - "debug", - f"API response is not JSON format: {e}. This is normal for plain text responses. Response: '{api_response[:100]}...'", + "error", + f"Failed to parse JSON from API response: {e}. Response: '{api_response[:100]}...'", ) - # If it's not JSON, it might be plain text without function calls return [] if not isinstance(api_response, dict): self._log_if_verbose( - "debug", - f"API response is not a dictionary (type: {type(api_response)}), no function calls detected", + "warning", + f"API response is not a dictionary (type: {type(api_response)}), returning empty list", ) return []