Skip to content

Commit

Permalink
Merge pull request #1631 from iorisa/fixbug/1623
Browse files Browse the repository at this point in the history
fixbug: #1623, use a share context to pass the repo path information
  • Loading branch information
iorisa authored Dec 6, 2024
2 parents 68b7dc6 + 3aaa8cf commit 0a5a235
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 0a5a235

Please sign in to comment.