Implements shutdown command.

pull/10/head
Torantulino 2023-03-30 10:10:05 +01:00
parent acbf0dc701
commit af17977c72
2 changed files with 3 additions and 0 deletions

View File

@ -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"

View File

@ -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: