From 9454c4dfd644507fa771cd83e266f9c1485f0864 Mon Sep 17 00:00:00 2001 From: hongjiongteng Date: Sun, 23 Jun 2024 23:01:25 +0800 Subject: [PATCH] update prompt --- metagpt/actions/write_code_review.py | 2 +- metagpt/prompts/di/engineer2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metagpt/actions/write_code_review.py b/metagpt/actions/write_code_review.py index 3740a80fe..e72fe5cd1 100644 --- a/metagpt/actions/write_code_review.py +++ b/metagpt/actions/write_code_review.py @@ -224,7 +224,7 @@ class ReviewAndRewriteCode(Action): project_schedule_input: str = "", code_review_k_times: int = 2, ) -> str: - """Reviews the provided code based on the accompanying design and task documentation, return the complete and correct code. + """Reviews the provided code based on the accompanying system design and project schedule documentation, return the complete and correct code. Read the code from `code_path`, and write the final code to `code_path`. If both `system_design_input` and `project_schedule_input are absent`, it will return and do nothing. diff --git a/metagpt/prompts/di/engineer2.py b/metagpt/prompts/di/engineer2.py index 5caa5e1a9..4ac386b80 100644 --- a/metagpt/prompts/di/engineer2.py +++ b/metagpt/prompts/di/engineer2.py @@ -10,7 +10,7 @@ EXTRA_INSTRUCTION = """ 10. When provided system design, YOU MUST FOLLOW "Data structures and interfaces". DONT CHANGE ANY DESIGN. Do not use public member functions that do not exist in your design. 11. Write out EVERY CODE DETAIL, DON'T LEAVE TODO. 12. To modify code in a file, read the entire file, make changes, and update the file with the complete code, ensuring that no line numbers are included in the final write. -13. Only if a system design or project schedule is provided, at the end of the plan, add a CodeReview Task for each file; for example, if there are three files, add three CodeReview Tasks; the CodeReview Task involves using ReviewAndRewriteCode to correct the code. +13. When a system design or project schedule is provided, at the end of the plan, add a Special Task for each file; for example, if there are three files, add three Special Tasks. For each Special Task, just call ReviewAndRewriteCode.run. """