diff --git a/config.template b/config.template index 92aa9cf..07af02c 100644 --- a/config.template +++ b/config.template @@ -60,6 +60,9 @@ ollama = False # ollamaModel = llama3.1 # server instance to use (defaults to local machine install) ollamaHostName = http://localhost:11434 +# Produce LLM replies to messages that aren't commands? +# If False, the LLM only replies to the "ask:" and "askai" commands. +llmReplyToNonCommands = True # StoreForward Enabled and Limits StoreForward = True diff --git a/mesh_bot.py b/mesh_bot.py index 0d142d0..55ac24d 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -1243,7 +1243,7 @@ def onReceive(packet, interface): playingGame = False if not playingGame: - if llm_enabled: + if llm_enabled and llmReplyToNonCommands: # respond with LLM llm = handle_llm(message_from_id, channel_number, rxNode, message_string, publicChannel) send_message(llm, channel_number, message_from_id, rxNode) diff --git a/modules/settings.py b/modules/settings.py index ce269d6..4e6aeaa 100644 --- a/modules/settings.py +++ b/modules/settings.py @@ -222,6 +222,7 @@ try: llm_enabled = config['general'].getboolean('ollama', False) # https://ollama.com llmModel = config['general'].get('ollamaModel', 'gemma2:2b') # default gemma2:2b ollamaHostName = config['general'].get('ollamaHostName', 'http://localhost:11434') # default localhost + llmReplyToNonCommands = config['general'].getboolean('llmReplyToNonCommands', True) # emergency response emergency_responder_enabled = config['emergencyHandler'].getboolean('enabled', False) emergency_responder_alert_channel = config['emergencyHandler'].getint('alert_channel', 2) # default 2