Merge branch 'mgx_ops' into feature-terminal

This commit is contained in:
seeker 2024-04-12 11:55:40 +08:00
commit 73afb493de
21 changed files with 517 additions and 67 deletions

View file

@ -0,0 +1,26 @@
import asyncio
from metagpt.roles.di.data_interpreter import DataInterpreter
# an example to showcase navigation
MG_LLM_CONFIG_REQ = """
This is a link to the doc site of MetaGPT project: https://docs.deepwisdom.ai/main/en/
Check where you can go to on the site and try to find out the list of LLM APIs supported by MetaGPT.
Don't write all codes in one response, each time, just write code for one step.
"""
# an example to showcase searching
PAPER_LIST_REQ = """"
At https://papercopilot.com/statistics/iclr-statistics/iclr-2024-statistics/,
find the first paper whose title includes `multiagent`, open it and summarize its abstract.
Don't write all codes in one response, each time, just write code for one step.
"""
async def main():
di = DataInterpreter(tools=["Browser"], react_mode="react")
await di.run(MG_LLM_CONFIG_REQ)
if __name__ == "__main__":
asyncio.run(main())

View file

@ -6,12 +6,16 @@ import asyncio
from metagpt.roles.di.mgx import MGX
requirement = (
"design a game using Gym (an open source Python library), including a graphical interface and interactive gameplay"
# "design a game using Gym (an open source Python library), including a graphical interface and interactive gameplay"
# "帮我把pip的源设置成https://pypi.tuna.tsinghua.edu.cn/simple"
# "This is a website url does not require login: https://demosc.chinaz.net/Files/DownLoad//moban/202404/moban7767 please write a similar web page,developed in vue language, The package.json dependency must be generated"
"I would like to imitate the website available at https://demosc.chinaz.net/Files/DownLoad//moban/202404/moban7767. Could you please browse through it?"
# "Create a 2048 Game"
)
async def main(requirement: str = ""):
mgx = MGX(use_intent=True)
mgx = MGX(use_intent=True, tools=["<all>"])
await mgx.run(requirement)