Skip to content

Commit

Permalink
fixbug: use a share context to pass the repo path information
Browse files Browse the repository at this point in the history
  • Loading branch information
莘权 马 committed Dec 6, 2024
1 parent 68b7dc6 commit 3aaa8cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/use_off_the_shelf_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
"""
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])

Expand Down

0 comments on commit 3aaa8cf

Please sign in to comment.