Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

add example for the researcher role

shenchucheng2d8a3f129685
diff --git a/examples/research.py b/examples/research.py
new file mode 100644
index 000000000..8625eaa1b
--- /dev/null
+++ b/examples/research.py
@@ -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())
diff --git a/setup.py b/setup.py
index e65696901..2a8edaae7 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ setup(
install_requires=requirements,
extras_require={
"playwright": ["playwright>=1.26", "beautifulsoup4"],
- "selenium": ["selenium>4", "webdriver_manager<3.9", "beautifulsoup4"],
+ "selenium": ["selenium>4", "webdriver_manager", "beautifulsoup4"],
},
cmdclass={
"install_mermaid": InstallMermaidCLI,