mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-07 09:22:44 +02:00
enhance DM/Channel logic for llm
fix logic for DM or Channel Sending
This commit is contained in:
+3
-3
@@ -137,7 +137,7 @@ def handle_llm(message_from_id, channel_number, deviceID, message, publicChannel
|
||||
|
||||
# if the message_from_id is not in the llmLocationTable send the welcome message
|
||||
if not message_from_id in llmLocationTable:
|
||||
if channel_number == publicChannel:
|
||||
if (channel_number == publicChannel and antiSpam) or useDMForResponse:
|
||||
# send via DM
|
||||
send_message(welcome_message, channel_number, message_from_id, deviceID)
|
||||
time.sleep(responseDelay)
|
||||
@@ -159,7 +159,7 @@ def handle_llm(message_from_id, channel_number, deviceID, message, publicChannel
|
||||
averageRuntime = sum(llmTotalRuntime) / len(llmTotalRuntime)
|
||||
if averageRuntime > 25:
|
||||
msg = f"Please wait, average query time is: {int(averageRuntime)} seconds"
|
||||
if channel_number == publicChannel:
|
||||
if (channel_number == publicChannel and antiSpam) or useDMForResponse:
|
||||
# send via DM
|
||||
send_message(msg, channel_number, message_from_id, deviceID)
|
||||
time.sleep(responseDelay)
|
||||
@@ -169,7 +169,7 @@ def handle_llm(message_from_id, channel_number, deviceID, message, publicChannel
|
||||
time.sleep(responseDelay)
|
||||
else:
|
||||
msg = "Please wait, response could take 30+ seconds. Fund the SysOp's GPU budget!"
|
||||
if channel_number == publicChannel:
|
||||
if (channel_number == publicChannel and antiSpam) or useDMForResponse:
|
||||
# send via DM
|
||||
send_message(msg, channel_number, message_from_id, deviceID)
|
||||
time.sleep(responseDelay)
|
||||
|
||||
Reference in New Issue
Block a user