changed rstrip for strip and added case for empty string

changed rstrip for strip and added case for empty string in agent.py
This commit is contained in:
Manuel Otheo
2023-04-17 09:17:07 -06:00
parent 10cd0f3362
commit 286edbbb8c

View File

@@ -115,9 +115,12 @@ class Agent:
console_input = clean_input(
Fore.MAGENTA + "Input:" + Style.RESET_ALL
)
if console_input.lower().rstrip() == "y":
if console_input.lower().strip() == "y":
user_input = "GENERATE NEXT COMMAND JSON"
break
elif console_input.lower().strip() == "":
print("Invalid input format.")
break
elif console_input.lower().startswith("y -"):
try:
self.next_action_count = abs(