mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-25 00:36:55 +02:00
Merge pull request #1631 from iorisa/fixbug/1623
fixbug: #1623, use a share context to pass the repo path information
This commit is contained in:
commit
0a5a2357d0
1 changed files with 3 additions and 1 deletions
|
|
@ -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])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue