mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
feat: merge send18
This commit is contained in:
parent
7effe7f74c
commit
ea21217a69
54 changed files with 366 additions and 930 deletions
|
|
@ -5,14 +5,8 @@
|
|||
@Modified By: mashenquan, 2023-8-9, fix-bug: cannot find metagpt module.
|
||||
"""
|
||||
import asyncio
|
||||
<<<<<<< HEAD
|
||||
|
||||
from metagpt.actions import Action
|
||||
=======
|
||||
from pathlib import Path
|
||||
import sys
|
||||
sys.path.append(str(Path(__file__).resolve().parent.parent))
|
||||
>>>>>>> send18/dev
|
||||
from metagpt.const import DATA_PATH
|
||||
from metagpt.document_store import FaissStore
|
||||
from metagpt.logs import logger
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
@Modified By: mashenquan, 2023-8-9, fix-bug: cannot find metagpt module.
|
||||
"""
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
import sys
|
||||
sys.path.append(str(Path(__file__).resolve().parent.parent))
|
||||
|
||||
from metagpt.roles import Searcher
|
||||
from metagpt.tools import SearchEngineType
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,15 @@
|
|||
import asyncio
|
||||
from pathlib import Path
|
||||
|
||||
from metagpt.config import CONFIG
|
||||
|
||||
import aiofiles
|
||||
import fire
|
||||
from metagpt.logs import logger
|
||||
|
||||
from metagpt.actions.write_teaching_plan import TeachingPlanRequirement
|
||||
from metagpt.config import CONFIG
|
||||
from metagpt.logs import logger
|
||||
from metagpt.roles.teacher import Teacher
|
||||
from metagpt.software_company import SoftwareCompany
|
||||
from metagpt.schema import Message
|
||||
from metagpt.team import Team
|
||||
|
||||
|
||||
async def startup(lesson_file: str, investment: float = 3.0, n_round: int = 1, *args, **kwargs):
|
||||
|
|
@ -82,10 +83,10 @@ async def startup(lesson_file: str, investment: float = 3.0, n_round: int = 1, *
|
|||
logger.info("No course content provided, using the demo course.")
|
||||
lesson = demo_lesson
|
||||
|
||||
company = SoftwareCompany()
|
||||
company = Team()
|
||||
company.hire([Teacher(*args, **kwargs)])
|
||||
company.invest(investment)
|
||||
company.start_project(lesson, cause_by=TeachingPlanRequirement, role="Teacher", **kwargs)
|
||||
company.env.publish_message(Message(content=lesson, cause_by=TeachingPlanRequirement))
|
||||
await company.run(n_round=1)
|
||||
|
||||
|
||||
|
|
@ -102,7 +103,7 @@ def main(idea: str, investment: float = 3.0, n_round: int = 5, *args, **kwargs):
|
|||
asyncio.run(startup(idea, investment, n_round, *args, **kwargs))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
"""
|
||||
Formats:
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue