🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
rm unused & format
yzlin5dde5a8875bf
diff --git a/examples/imitate_webpage.py b/examples/imitate_webpage.pyindex 6c12c7eda..b69101861 100644--- a/examples/imitate_webpage.py+++ b/examples/imitate_webpage.py@@ -9,7 +9,7 @@ from metagpt.roles.code_interpreter import CodeInterpreterasync def main():- web_url = 'https://pytorch.org/'+ web_url = "https://pytorch.org/"prompt = f"""This is a URL of webpage: '{web_url}' .Firstly, utilize Selenium and WebDriver for rendering.Secondly, convert image to a webpage including HTML, CSS and JS in one go.@@ -20,7 +20,7 @@ Note: All required dependencies and environments have been fully installed and cawait ci.run(prompt)-if __name__ == '__main__':+if __name__ == "__main__":import asyncioasyncio.run(main())diff --git a/tests/metagpt/actions/test_make_tools.py b/tests/metagpt/actions/test_make_tools.pydeleted file mode 100644index 8e94c6eee..000000000--- a/tests/metagpt/actions/test_make_tools.py+++ /dev/null@@ -1,52 +0,0 @@-import pytest--from metagpt.actions.execute_code import ExecutePyCode-from metagpt.actions.write_analysis_code import MakeTools-from metagpt.logs import logger---async def test_make_tools():- code = "import yfinance as yf\n\n# Collect Alibaba stock data\nalibaba = yf.Ticker('BABA')\ndata = alibaba.history(period='1d', start='2022-01-01', end='2022-12-31')\nprint(data.head())"- msgs = [{"role": "assistant", "content": code}]- mt = MakeTools()- tool_code = await mt.run(msgs)- logger.debug(tool_code)- ep = ExecutePyCode()- tool_code = "!pip install yfinance\n" + tool_code- result, res_type = await ep.run(tool_code)- assert res_type is True- logger.debug(result)---async def test_make_tools2():- code = """import pandas as pd\npath = "./tests/data/test.csv"\ndf = pd.read_csv(path)\ndata = df.copy()\n- data['started_at'] = data['started_at'].apply(lambda r: pd.to_datetime(r))\n- data['ended_at'] = data['ended_at'].apply(lambda r: pd.to_datetime(r))\ndata.head()"""- msgs = [{"role": "assistant", "content": code}]- mt = MakeTools()- tool_code = await mt.run(msgs)- logger.debug(tool_code)- ep = ExecutePyCode()- tool_code = tool_code- result, res_type = await ep.run(tool_code)- assert res_type is True- logger.debug(result)---async def test_make_tools3():- code = """import pandas as pd\npath = "./tests/data/test.csv"\ndf = pd.read_csv(path)\ndata = df.copy()\n- data['started_at'] = data['started_at'].apply(lambda r: pd.to_datetime(r))\n- data['ended_at'] = data['ended_at'].apply(lambda r: pd.to_datetime(r))\n- data['duration_hour'] = (data['ended_at'] - data['started_at']).dt.seconds/3600\ndata.head()"""- msgs = [{"role": "assistant", "content": code}]- mt = MakeTools()- tool_code = await mt.run(msgs)- logger.debug(tool_code)- ep = ExecutePyCode()- tool_code = tool_code- result, res_type = await ep.run(tool_code)- assert res_type is True- logger.debug(result)