🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
添加一个代码
ziming552547e6620e
diff --cc metagpt/actions/write_prd.pyindex bc2e175e8,2b96f867c..ac8712d50--- a/metagpt/actions/write_prd.py+++ b/metagpt/actions/write_prd.py@@@ -143,5 -143,5 +143,6 @@@ class WritePRD(Action)format_example=FORMAT_EXAMPLE)logger.debug(prompt)prd = await self._aask_v1(prompt, "prd", OUTPUT_MAPPING)+return prd+diff --cc metagpt/management/skill_manager.pyindex dbe8d1545,f967a0a94..4852e452f--- a/metagpt/management/skill_manager.py+++ b/metagpt/management/skill_manager.py@@@ -15,10 -15,10 +15,10 @@@ Skill = Actioclass SkillManager:- """用来管理所有技能"""+ """Used to manage all skills"""def __init__(self):- self._llm = LLM()+ self._llm=LLM.DEFAULT_LLMself._store = ChromaStore('skill_manager')self._skills: dict[str: Skill] = {}diff --cc metagpt/roles/role.pyindex add0a339c,b1ae51cf5..52cc693a0--- a/metagpt/roles/role.py+++ b/metagpt/roles/role.py@@@ -91,10 -91,10 +91,10 @@@ class RoleContext(BaseModel)class Role:- """角色/代理"""+ """Role/Agent"""def __init__(self, name="", profile="", goal="", constraints="", desc=""):- self._llm = LLM()+ self._llm=LLM.DEFAULT_LLMself._setting = RoleSetting(name=name, profile=profile, goal=goal, constraints=constraints, desc=desc)self._states = []self._actions = []diff --cc startup.pyindex 94e2788e3,e6d5fc4e9..08816740e--- a/startup.py+++ b/startup.py@@@ -24,18 -40,28 +40,21 @@@ async def startupawait company.run(n_round=n_round)-def main(- idea: str,- investment: float = 3.0,- n_round: int = 5,- code_review: bool = True,- run_tests: bool = False,- implement: bool = True-):+def main(idea: str ='写一个贪吃蛇命令行游戏', investment: float = 3.0, n_round: int = 5, code_review: bool = False, run_tests: bool = False):"""- We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.+ We are a software startup comprised of AI. By investing in us,+ you are empowering a future filled with limitless possibilities.:param idea: Your innovative idea, such as "Creating a snake game."- :param investment: As an investor, you have the opportunity to contribute a certain dollar amount to this AI company.+ :param investment: As an investor, you have the opportunity to contribute+ a certain dollar amount to this AI company.:param n_round::param code_review: Whether to use code review.:return:"""if platform.system() == "Windows":asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())- asyncio.run(startup(idea, investment, n_round, code_review, run_tests))+ asyncio.run(startup(idea, investment, n_round,- code_review, run_tests, implement))++ code_review, run_tests))if __name__ == '__main__':