From fe8ba8aaf4163495293ddfa4f75cda76cc98073c Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 21 Jan 2025 20:10:01 -0800 Subject: [PATCH] Update mesh_bot.py --- mesh_bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index 76ab1ef..f4ba95f 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -343,6 +343,7 @@ def handle_satpass(message_from_id, deviceID, channel_number, message): def handle_llm(message_from_id, channel_number, deviceID, message, publicChannel): global llmRunCounter, llmLocationTable, llmTotalRuntime, cmdHistory location_name = 'no location provided' + msg = '' if location_enabled: # if message_from_id is is the llmLocationTable use the location from the list to save on API calls @@ -396,11 +397,11 @@ def handle_llm(message_from_id, channel_number, deviceID, message, publicChannel # information for the user on how long the query will take on average if llmRunCounter > 0: averageRuntime = sum(llmTotalRuntime) / len(llmTotalRuntime) - msg = f"Please wait, average query time is: {int(averageRuntime)} seconds" if averageRuntime > 25 else None + msg = f"Please wait, average query time is: {int(averageRuntime)} seconds" if averageRuntime > 25 else '' else: logger.debug(f"System: LLM: First Query, computing runtime") - if msg: + if msg != '': if (channel_number == publicChannel and antiSpam) or useDMForResponse: # send via DM send_message(msg, channel_number, message_from_id, deviceID)