From 128312be59d053abdfa5a4f2526f90ad776b266d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BC=9F=E9=9F=AC?= Date: Wed, 25 Sep 2024 20:36:42 +0800 Subject: [PATCH] Fix: Engineer do not complete all the unit tests task --- metagpt/prompts/di/engineer2.py | 3 ++- metagpt/prompts/di/role_zero.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/metagpt/prompts/di/engineer2.py b/metagpt/prompts/di/engineer2.py index 5c43d401b..8a3860742 100644 --- a/metagpt/prompts/di/engineer2.py +++ b/metagpt/prompts/di/engineer2.py @@ -80,7 +80,8 @@ Note: 21. When using the editor, pay attention to the editor's current directory. When you use editor tools, the paths must be either absolute or relative to the editor's current directory. 22. The default programming languages are Native HTML. 23. When planning, consider whether images are needed. If you are developing a showcase website, start by using ImageGetter.get_image to obtain the necessary images. -24. If you finish all the tasks, use the command "end" to end. +24. When planning, merge multiple tasks that operate on the same file into a single task. For example, create one task for writing unit tests for all functions in a class. Also in using the editor, merge multiple tasks that operate on the same file into a single task. +25. When create unit tests for a code file, use Editor.read() to read the code file before planing. And create one plan to writing the unit test for the whole file. """ CURRENT_STATE = """ The current editor state is: diff --git a/metagpt/prompts/di/role_zero.py b/metagpt/prompts/di/role_zero.py index 58ef6827b..e86d9dc47 100644 --- a/metagpt/prompts/di/role_zero.py +++ b/metagpt/prompts/di/role_zero.py @@ -125,7 +125,7 @@ ASK_HUMAN_COMMAND = """ { "command_name": "RoleZero.ask_human", "args": { - "question": "I'm a little uncertain about the next step, could you provide me with some guidance? If want to stop, please contain \"\" in your response." + "question": "I'm a little uncertain about the next step, could you provide me with some guidance? If you want to stop, please include in your response." } } ]