From 63bfa7d89a65f0e7679d5d7f1b342f631cf5a49a Mon Sep 17 00:00:00 2001 From: Torantulino Date: Wed, 29 Mar 2023 00:21:14 +0100 Subject: [PATCH] Gives feedback to AI if for some reason no command can be executed. --- AutonomousAI/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AutonomousAI/main.py b/AutonomousAI/main.py index 886e3f97..a1ab577a 100644 --- a/AutonomousAI/main.py +++ b/AutonomousAI/main.py @@ -223,8 +223,10 @@ while True: result = execute_command(command_name, arguments) - # Check if there's a result append it to the message history + # Check if there's a result from the command append it to the message history if result != None: full_message_history.append(create_chat_message("system", result)) print("system: " + result) - + else: + full_message_history.append(create_chat_message("system", "Unable to execute command")) + print("system: Unable to execute command")