feat: merge geekan:main

This commit is contained in:
莘权 马 2023-11-27 17:43:20 +08:00
parent d8adba99d4
commit 66fc1b8350
25 changed files with 488 additions and 688 deletions

View file

@ -2,7 +2,7 @@
# @Date : 2023/7/22 02:40
# @Author : stellahong (stellahong@fuzhi.ai)
#
from metagpt.software_company import SoftwareCompany
from metagpt.team import Team
from metagpt.roles import ProductManager
from tests.metagpt.roles.ui_role import UI
@ -15,7 +15,7 @@ def test_add_ui():
async def test_ui_role(idea: str, investment: float = 3.0, n_round: int = 5):
"""Run a startup. Be a boss."""
company = SoftwareCompany()
company = Team()
company.hire([ProductManager(), UI()])
company.invest(investment)
company.start_project(idea)

View file

@ -8,12 +8,12 @@
import pytest
from metagpt.logs import logger
from metagpt.software_company import SoftwareCompany
from metagpt.team import Team
@pytest.mark.asyncio
async def test_software_company():
company = SoftwareCompany()
async def test_team():
company = Team()
company.start_project("做一个基础搜索引擎,可以支持知识库")
history = await company.run(n_round=5)
logger.info(history)