From 0353f36f0d9c04452a421e702ee984fbabc973c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=A3=92=E6=A3=92?= Date: Wed, 24 Jan 2024 15:21:32 +0800 Subject: [PATCH] new file: examples/crawle_webpage.py --- examples/crawle_webpage.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/crawle_webpage.py diff --git a/examples/crawle_webpage.py b/examples/crawle_webpage.py new file mode 100644 index 000000000..2c616035f --- /dev/null +++ b/examples/crawle_webpage.py @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +""" +@Date : 2024/01/24 15:11:27 +@Author : orange-crow +@File : crawle_webpage.py +""" + +from metagpt.roles.code_interpreter import CodeInterpreter + + +async def main(): + prompt = """Get data from `paperlist` table in https://papercopilot.com/statistics/iclr-statistics/iclr-2024-statistics/, + and save it to a csv file. paper title must include `multiagent` or `large language model`. *notice: print key data*""" + ci = CodeInterpreter(goal=prompt, use_tools=True) + + await ci.run(prompt) + + +if __name__ == "__main__": + import asyncio + + asyncio.run(main())