From 812d6a825d21047f96a241cb9c8d23b471d4004c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BC=9F=E9=9F=AC?= Date: Fri, 9 Aug 2024 20:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E5=B9=B6swe-agent?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=8F=90=E7=A4=BA=E8=AF=8D=E5=90=8E=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metagpt/prompts/di/swe_agent.py | 4 ++-- metagpt/roles/di/swe_agent.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metagpt/prompts/di/swe_agent.py b/metagpt/prompts/di/swe_agent.py index a737d4a72..7151199ad 100644 --- a/metagpt/prompts/di/swe_agent.py +++ b/metagpt/prompts/di/swe_agent.py @@ -239,6 +239,6 @@ Avoid repeating the same command. Instead, please think about the current situat CURRENT_BASH_STATE = """ # Output Next Step The current bash state is: -(Open file: {{open_file}}) -(Current directory: {{working_dir}}) +(Open file: {open_file}) +(Current directory: {working_dir}) """ diff --git a/metagpt/roles/di/swe_agent.py b/metagpt/roles/di/swe_agent.py index 13fc87c60..e1d2c9613 100644 --- a/metagpt/roles/di/swe_agent.py +++ b/metagpt/roles/di/swe_agent.py @@ -53,7 +53,7 @@ class SWEAgent(RoleZero): """ state_output = await self.terminal.run("state") bash_state = json.loads(state_output) - self.cmd_prompt_current_state = CURRENT_BASH_STATE.formate(**bash_state).strip() + self.cmd_prompt_current_state = CURRENT_BASH_STATE.format(**bash_state).strip() async def _parse_commands_for_eval(self): """