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.
This commit is contained in:
Kumi 2023-11-29 08:33:41 +01:00
parent 4d64593e89
commit 36e34d5fcf
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

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