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.
This commit is contained in:
Kumi 2024-05-18 21:32:32 +02:00
parent 75d00ea50e
commit 7f8ff1502a
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -29,8 +29,6 @@ async def command_calculate(room: MatrixRoom, event: RoomMessageText, bot):
else: else:
await bot.send_message(room, subpod, True) 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 return
await bot.send_message(room, "You need to provide a prompt.", True) await bot.send_message(room, "You need to provide a prompt.", True)