From 7f8ff1502a95085595df81369a4ca08d00f4c118 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sat, 18 May 2024 21:32:32 +0200 Subject: [PATCH] fix: remove redundant API usage log call Removed an unnecessary call to `log_api_usage` after command execution in the calculate command handler. This change eliminates redundant logging that didn't contribute valuable insights and led to clutter in log files, streamlining the process and potentially improving performance by reducing I/O operations. --- src/gptbot/commands/calculate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gptbot/commands/calculate.py b/src/gptbot/commands/calculate.py index 8ec6580..c94ce5b 100644 --- a/src/gptbot/commands/calculate.py +++ b/src/gptbot/commands/calculate.py @@ -29,8 +29,6 @@ async def command_calculate(room: MatrixRoom, event: RoomMessageText, bot): else: await bot.send_message(room, subpod, True) - bot.log_api_usage(event, room, f"{bot.calculation_api.api_code}-{bot.calculation_api.calculation_api}", tokens_used) - return await bot.send_message(room, "You need to provide a prompt.", True) \ No newline at end of file