change PROJECT_ROOT setting & SoftwareCompany -> Team

This commit is contained in:
garylin2099 2023-11-08 19:42:30 +08:00
parent c6350efd7f
commit 56c2a162ac
10 changed files with 54 additions and 90 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)