Browse Source

Removed traceback print from exception handling in bot's tool call

Eliminated the printing of traceback in the exception handling block when the GPTBot encounters an error calling a tool. This change cleans up the logs by removing a redundant error output since relevant information is already being logged. The update aims to enhance the clarity and readability of the logs in case of tool calling errors.
Kumi 1 year ago
parent
commit
36e34d5fcf
1 changed files with 0 additions and 1 deletions
  1. 0 1
      src/gptbot/classes/bot.py

+ 0 - 1
src/gptbot/classes/bot.py

@@ -376,7 +376,6 @@ class GPTBot:
 
         except Exception as e:
             self.logger.log(f"Error calling tool {tool}: {e}", "error")
-            traceback.print_exc()
             return f"Error: Something went wrong calling tool {tool}"
 
     async def process_command(self, room: MatrixRoom, event: RoomMessageText):