🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix: write_code_function bug.
刘棒棒8b171b51337d
diff --git a/metagpt/actions/write_code_function.py b/metagpt/actions/write_code_function.pyindex 1f273a707..c2fb6189a 100644--- a/metagpt/actions/write_code_function.py+++ b/metagpt/actions/write_code_function.py@@ -27,7 +27,7 @@ class WriteCodeFunction(BaseWriteAnalysisCode):super().__init__(name, context, llm)def process_msg(self, prompt: Union[str, List[Dict], Message, List[Message]], system_msg: str = None):- default_system_msg = """You are Open Interpreter, a world-class programmer that can complete any goal by executing code. Strictly follow the plan and generate code step by step. Each step of the code will be executed on the user's machine, and the user will provide the code execution results to you."""+ default_system_msg = """You are Open Interpreter, a world-class programmer that can complete any goal by executing code. Strictly follow the plan and generate code step by step. Each step of the code will be executed on the user's machine, and the user will provide the code execution results to you.**Notice: The code for the next step depends on the code for the previous step.**"""# 全部转成listif not isinstance(prompt, list):prompt = [prompt]