🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Update prompt in write_code_guide_an.py.
mannaandpoem99b1666bffb3
diff --git a/metagpt/actions/write_code_guide_an.py b/metagpt/actions/write_code_guide_an.pyindex adf21220b..e99e6b839 100644--- a/metagpt/actions/write_code_guide_an.py+++ b/metagpt/actions/write_code_guide_an.py@@ -7,21 +7,19 @@"""import asyncio-from metagpt.actions.action_node import ActionNode-from pydantic import Fieldfrom metagpt.actions.action import Action+from metagpt.actions.action_node import ActionNodefrom metagpt.llm import LLMfrom metagpt.provider.base_gpt_api import BaseGPTAPIfrom metagpt.schema import Document-GUIDELINE = ActionNode(key="Code Guideline",expected_type=list[str],instruction="You are a professional software engineer, and your main task is to "- "proposing incremental development plans and code guidance",+ "proposing incremental development plans and code guidance",example=["`calculator.py` should be extended to include methods for subtraction, multiplication, and division. Error handling should be implemented for division to prevent division by zero.","New endpoints for subtraction, multiplication, and division should be added to `main.py`.",@@ -80,7 +78,7 @@ def divide_numbers():return jsonify({'result': result}), 200if __name__ == '__main__':app.run()-```"""+```""",)@@ -199,15 +197,10 @@ class Calculator:"""-GUIDE_NODES = [- GUIDELINE,- INCREMENTAL_CHANGE-]+GUIDE_NODES = [GUIDELINE, INCREMENTAL_CHANGE]WRITE_CODE_GUIDE_NODE = ActionNode.from_children("WriteCodeGuide", GUIDE_NODES)-# 1. 对最后的全部代码进行review一次,或者测试-# 2. 将user requirement也作为write code的输入-# 3. 对前置的action进行重新设计+class WriteCodeGuide(Action):name: str = "WriteCodeGuide"