Skip to content

Commit

Permalink
changed rstrip for strip and added case for empty string
Browse files Browse the repository at this point in the history
changed rstrip for strip and added case for empty string in agent.py
  • Loading branch information
Lootheo committed Apr 17, 2023
1 parent 10cd0f3 commit 286edbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autogpt/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@ def start_interaction_loop(self):
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(
Expand Down

0 comments on commit 286edbb

Please sign in to comment.