🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Merge remote-tracking branch 'upstream/main'
brucemeek730e2f912f60
diff --cc metagpt/roles/engineer.pyindex a9963c25b,072e53998..d6218d05b--- a/metagpt/roles/engineer.py+++ b/metagpt/roles/engineer.py@@@ -161,13 -155,14 +173,14 @@@ class Engineer(Role)return msgasync def _act_sp_precision(self) -> Message:+ code_msg_all = [] # gather all code info, will pass to qa_engineer for tests laterfor todo in self.todos:"""- # 从历史信息中挑选必须的信息,以减少prompt长度(人工经验总结)- 1. Architect全部- 2. ProjectManager全部- 3. 是否需要其他代码(暂时需要)?- TODO:目标是不需要。在任务拆分清楚后,根据设计思路,不需要其他代码也能够写清楚单个文件,如果不能则表示还需要在定义的更清晰,这个是代码能够写长的关键+ # Select essential information from the historical data to reduce the length of the prompt (summarized from human experience):+ 1. All from Architect+ 2. All from ProjectManager+ 3. Do we need other codes (currently needed)?+ TODO: The goal is not to need it. After clear task decomposition, based on the design idea, you should be able to write a single file without needing other codes. If you can't, it means you need a clearer definition. This is the key to writing longer code."""context = []msg = self._rc.memory.get_by_actions([WriteDesign, WriteTasks, WriteCode])