🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix typo
黄伟韬e343def83150
diff --git a/metagpt/prompts/di/role_zero.py b/metagpt/prompts/di/role_zero.pyindex a703b1d41..e04155fe8 100644--- a/metagpt/prompts/di/role_zero.py+++ b/metagpt/prompts/di/role_zero.py@@ -119,17 +119,11 @@ END_COMMAND = """```"""-SUMMARY_TROUBLE = """-You are repeating the same action.-Please summarize what is confusing or troubling you, and tell me directly.-Do not output any commands.-Your response must be in {language} and should be within 30 words.-"""-DUPULICATE_QUESTTION_FORMAT = """-I meet the following trouble:-{trouble}-Could you provide me with some guidance?-If want to stop, please contain \"<STOP>\" in your guidance.+SUMMARY_PROBLEM_WHEN_DUPLICATE = """Please directly tell me what is confusing or troubling you. Your response should be in {language} and within 30 words."""+ASK_HUMAN_GUIDANCE_FORMAT = """+I am facing the following problem:+{problem}+Could you please provide me with some guidance?If you want to stop, please include "<STOP>" in your guidance."""ASK_HUMAN_COMMAND = [{"command_name": "RoleZero.ask_human", "args": {"question": ""}}]diff --git a/metagpt/roles/di/engineer2.py b/metagpt/roles/di/engineer2.pyindex 2404949cb..044ff0afd 100644--- a/metagpt/roles/di/engineer2.py+++ b/metagpt/roles/di/engineer2.py@@ -119,7 +119,7 @@ class Engineer2(RoleZero):Args:path (str): The absolute path of the file to be created.- file_description (optional, str): Further hints or notice other than the current task description, must be very concise and can be empty. Defaults to "".+ file_description (optional, str): "Brief description and important notes of the file content, must be very concise and can be empty. Defaults to ""."""plan_status, _ = self._get_plan_status()prompt = WRITE_CODE_PROMPT.format(diff --git a/metagpt/roles/di/role_zero.py b/metagpt/roles/di/role_zero.pyindex a78202378..9fca8f468 100644--- a/metagpt/roles/di/role_zero.py+++ b/metagpt/roles/di/role_zero.py@@ -19,9 +19,9 @@ from metagpt.exp_pool.serializers import RoleZeroSerializerfrom metagpt.logs import loggerfrom metagpt.prompts.di.role_zero import (ASK_HUMAN_COMMAND,+ ASK_HUMAN_GUIDANCE_FORMAT,CMD_PROMPT,DETECT_LANGUAGE_PROMPT,- DUPULICATE_QUESTTION_FORMAT,END_COMMAND,JSON_REPAIR_PROMPT,QUICK_RESPONSE_SYSTEM_PROMPT,@@ -31,8 +31,8 @@ from metagpt.prompts.di.role_zero import (REGENERATE_PROMPT,REPORT_TO_HUMAN_PROMPT,ROLE_INSTRUCTION,+ SUMMARY_PROBLEM_WHEN_DUPLICATE,SUMMARY_PROMPT,- SUMMARY_TROUBLE,SYSTEM_PROMPT,)from metagpt.roles import Role@@ -401,9 +401,9 @@ class RoleZero(Role):logger.warning(f"Duplicate response detected: {command_rsp}")return END_COMMANDtrouble_content = await self.llm.aask(- req + [UserMessage(content=SUMMARY_TROUBLE.format(language=self.respond_language))]+ req + [UserMessage(content=SUMMARY_PROBLEM_WHEN_DUPLICATE.format(language=self.respond_language))])- ASK_HUMAN_COMMAND[0]["args"]["question"] = DUPULICATE_QUESTTION_FORMAT.format(trouble=trouble_content)+ ASK_HUMAN_COMMAND[0]["args"]["question"] = ASK_HUMAN_GUIDANCE_FORMAT.format(trouble=trouble_content)ask_human_command = "```json\n" + json.dumps(ASK_HUMAN_COMMAND, indent=4, ensure_ascii=False) + "\n```"return ask_human_command# Try correction by self