mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-30 11:26:23 +02:00
add example for the researcher role
This commit is contained in:
parent
25d2621198
commit
2d8a3f1296
2 changed files with 17 additions and 1 deletions
16
examples/research.py
Normal file
16
examples/research.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import asyncio
|
||||
|
||||
from metagpt.roles.researcher import RESEARCH_PATH, Researcher
|
||||
|
||||
|
||||
async def main():
|
||||
topic = "dataiku .vs datarobot"
|
||||
role = Researcher(language="en-us")
|
||||
await role.run(topic)
|
||||
print(f"save report to {RESEARCH_PATH / f'{topic}.md'}.")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue