Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Implements shutdown command.

Torantulinoaf17977c7250
diff --git a/AutonomousAI/commands.py b/AutonomousAI/commands.py
index fbf11029f3..c427df87d6 100644
--- a/AutonomousAI/commands.py
+++ b/AutonomousAI/commands.py
@@ -52,6 +52,8 @@ def execute_command(command_name, arguments):
return get_text_summary(arguments["url"])
elif command_name == "write_to_file":
return write_to_file(arguments["file"], arguments["content"])
+ elif command_name == "task_complete":
+ shutdown()
else:
return f"unknown command {command_name}"
# All other errors, return "Error: + error message"
diff --git a/AutonomousAI/data/prompt.txt b/AutonomousAI/data/prompt.txt
index 6236a30da5..8e5a5883d1 100644
--- a/AutonomousAI/data/prompt.txt
+++ b/AutonomousAI/data/prompt.txt
@@ -18,6 +18,7 @@ COMMANDS:
9. Navigate & Perform: "navigate_website", args: "action": "click_button/input_text/register_account", "text/username": "<text>/<username>"
11. Get Text Summary: "get_text_summary", args: "url": "<url>"
13. Write to file: "write_to_file", args: "file": "<file>", "text": "<text>"
+14. Task Complete (Shutdown): "task_complete", args: "reason": "<reason>"
RESOURCES: