From ca1a44c3c4829bb2b911363ec26d71f2c31c3f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BC=9F=E9=9F=AC?= Date: Wed, 24 Jul 2024 10:56:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=8D=E7=9A=84=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metagpt/actions/write_prd.py | 2 +- metagpt/prompts/di/role_zero.py | 4 ++-- metagpt/roles/di/role_zero.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/metagpt/actions/write_prd.py b/metagpt/actions/write_prd.py index caa814a81..ae1b5dd81 100644 --- a/metagpt/actions/write_prd.py +++ b/metagpt/actions/write_prd.py @@ -323,4 +323,4 @@ class WritePRD(Action): md_output_filename = output_pathname.with_suffix(".md") await save_json_to_markdown(content=new_prd.content, output_filename=md_output_filename) await reporter.async_report(md_output_filename, "path") - return f'PRD filename: "{str(output_pathname)}". The "Create the PRD" task has been completed and is now marked as finished.' + return f'PRD filename: "{str(output_pathname)}". The product requirement document (PRD) has been completed.' diff --git a/metagpt/prompts/di/role_zero.py b/metagpt/prompts/di/role_zero.py index e91992f35..0e2126880 100644 --- a/metagpt/prompts/di/role_zero.py +++ b/metagpt/prompts/di/role_zero.py @@ -12,7 +12,7 @@ Note: """ # To ensure compatibility with hard-coded experience, do not add any other content between "# Example" and "# Available Commands". CMD_PROMPT = """ -# latest observation +# Latest Observation {latest_observation} # Data Structure @@ -50,7 +50,7 @@ In your response, include at least one command. # Your commands in a json array, in the following output format with correct command_name and args. If there is nothing to do, use the pass or end command: Some text indicating your thoughts before JSON is required, such as what tasks have been completed, what tasks are next, how you should update the plan status, respond to inquiry, or seek for help. Then a json array of commands. You must output ONE and ONLY ONE json array. DON'T output multiple json arrays with thoughts between them. -Firstly, describe the actions you have taken recently. +Firstly, describe the actions you have taken recently. Secondly, describe the messages you have received recently, with a particular emphasis on messages from users. Thirdly, describe your current task . Review the histroy, if you find that the current task is identical to a previously completed one, it indicates that the current task has already been accomplished. Then, articulate your thoughts and list the commands, adhering closely to the instructions provided. diff --git a/metagpt/roles/di/role_zero.py b/metagpt/roles/di/role_zero.py index f9591d693..40c03ccad 100644 --- a/metagpt/roles/di/role_zero.py +++ b/metagpt/roles/di/role_zero.py @@ -339,7 +339,7 @@ class RoleZero(Role): elif cmd["command_name"] == "end": self._set_state(-1) - command_output = " " + command_output = "" return command_output