mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-08-31 01:43:02 +08:00
fixbug: use a share context to pass the repo path information
This commit is contained in:
@@ -5,13 +5,15 @@ Author: garylin2099
|
||||
"""
|
||||
import asyncio
|
||||
|
||||
from metagpt.context import Context
|
||||
from metagpt.logs import logger
|
||||
from metagpt.roles.product_manager import ProductManager
|
||||
|
||||
|
||||
async def main():
|
||||
msg = "Write a PRD for a snake game"
|
||||
role = ProductManager()
|
||||
context = Context() # Used to share repo path information between multiple actions within the role.
|
||||
role = ProductManager(context=context)
|
||||
result = await role.run(msg)
|
||||
logger.info(result.content[:100])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user