From f3ced99c92cb662aae781e231618538fa4c1832d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BB=BA=E7=94=9F?= Date: Sat, 22 Feb 2025 21:09:52 +0800 Subject: [PATCH] update failed examples --- examples/di/arxiv_reader.py | 3 ++- examples/di/software_company.py | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/di/arxiv_reader.py b/examples/di/arxiv_reader.py index 6e1939b81..206b2aa98 100644 --- a/examples/di/arxiv_reader.py +++ b/examples/di/arxiv_reader.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from metagpt.roles.di.data_interpreter import DataInterpreter +from metagpt.tools.libs.web_scraping import view_page_element_to_scrape async def main(): @@ -10,7 +11,7 @@ async def main(): prompt = f"""This is a collection of arxiv urls: '{urls}' . Record each article, remove duplicates by title (they may have multiple tags), filter out papers related to large language model / agent / llm, print top 100 and visualize the word count of the titles""" - di = DataInterpreter(react_mode="react", tools=["scrape_web_playwright"]) + di = DataInterpreter(react_mode="react", tools=[view_page_element_to_scrape.__name__]) await di.run(prompt) diff --git a/examples/di/software_company.py b/examples/di/software_company.py index ac9999ca9..bdb4d76d4 100644 --- a/examples/di/software_company.py +++ b/examples/di/software_company.py @@ -22,13 +22,13 @@ Note: All required dependencies and environments have been fully installed and c """ di = DataInterpreter( tools=[ - "write_prd", - "write_design", - "write_project_plan", - "write_codes", - "run_qa_test", - "fix_bug", - "git_archive", + "WritePRD", + "WriteDesign", + "WritePlan", + "WriteCode", + "RunCode", + "DebugError", + # "git_archive", ] )