Skip to content

Commit 0a5a235

Browse files
authored
Merge pull request #1631 from iorisa/fixbug/1623
fixbug: #1623, use a share context to pass the repo path information
2 parents 68b7dc6 + 3aaa8cf commit 0a5a235

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/use_off_the_shelf_agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"""
66
import asyncio
77

8+
from metagpt.context import Context
89
from metagpt.logs import logger
910
from metagpt.roles.product_manager import ProductManager
1011

1112

1213
async def main():
1314
msg = "Write a PRD for a snake game"
14-
role = ProductManager()
15+
context = Context() # Used to share repo path information between multiple actions within the role.
16+
role = ProductManager(context=context)
1517
result = await role.run(msg)
1618
logger.info(result.content[:100])
1719

0 commit comments

Comments
 (0)