From cade788a7e68c5c7dda26c08682ba2884dd73444 Mon Sep 17 00:00:00 2001 From: fluxism Date: Mon, 24 Apr 2023 08:12:15 -0700 Subject: [PATCH] Add arg to do_nothing command (#3090) * Add arg to do_nothing command * do_nothing returns reason arg --- autogpt/app.py | 2 +- autogpt/prompts/prompt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autogpt/app.py b/autogpt/app.py index 590f3d50..6bcc851b 100644 --- a/autogpt/app.py +++ b/autogpt/app.py @@ -120,7 +120,7 @@ def execute_command( # non-file is given, return instructions "Input should be a python # filepath, write your code to file and try again elif command_name == "do_nothing": - return "No action performed." + return f"Error: No action performed. Reason: {arguments['reason']}" elif command_name == "task_complete": shutdown() else: diff --git a/autogpt/prompts/prompt.py b/autogpt/prompts/prompt.py index bd3cc7cb..cc06fabb 100644 --- a/autogpt/prompts/prompt.py +++ b/autogpt/prompts/prompt.py @@ -39,7 +39,7 @@ def build_default_prompt_generator() -> PromptGenerator: # Define the command list commands = [ - ("Do Nothing", "do_nothing", {}), + ("Do Nothing", "do_nothing", {"reason": ""}), ("Task Complete (Shutdown)", "task_complete", {"reason": ""}), ]