Skip to content

Commit 26252e6

Browse files
authored
Merge pull request #951 from garylin2099/v0.7-release
v0.7.4: rename interpreter
2 parents 45dd352 + 08bf756 commit 26252e6

39 files changed

+90
-88
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
</p>
2727

2828
## News
29-
🚀 Feb. 08, 2024: [v0.7.0](https://github.com/geekan/MetaGPT/releases/tag/v0.7.0) released, supporting assigning different LLMs to different Roles. We also introduced [Interpreter](https://github.com/geekan/MetaGPT/blob/main/examples/mi/README.md), a powerful agent capable of solving a wide range of real-world problems.
29+
🚀 March. 01, 2024: Our Data Interpreter paper is on arxiv. Find all design and benchmark details [here](https://arxiv.org/abs/2402.18679)!
30+
31+
🚀 Feb. 08, 2024: [v0.7.0](https://github.com/geekan/MetaGPT/releases/tag/v0.7.0) released, supporting assigning different LLMs to different Roles. We also introduced [Data Interpreter](https://github.com/geekan/MetaGPT/blob/main/examples/di/README.md), a powerful agent capable of solving a wide range of real-world problems.
3032

3133
🚀 Jan. 16, 2024: Our paper [MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
3234
](https://arxiv.org/abs/2308.00352) accepted for oral presentation **(top 1.2%)** at ICLR 2024, **ranking #1** in the LLM-based Agent category.

examples/di/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Data Interpreter (DI)
2+
3+
## What is Data Interpreter
4+
Data Interpreter is an agent who solves problems through codes. It understands user requirements, makes plans, writes codes for execution, and uses tools if necessary. These capabilities enable it to tackle a wide range of scenarios, please check out the examples below.
5+
6+
## Example List
7+
- Data visualization
8+
- Machine learning modeling
9+
- Image background removal
10+
- Solve math problems
11+
- Receipt OCR
12+
- Tool usage: web page imitation
13+
- Tool usage: web crawling
14+
- Tool usage: text2image
15+
- Tool usage: email summarization and response
16+
- More on the way!
17+
18+
Please see [here](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/interpreter/intro.html) for detailed explanation.

examples/mi/crawl_webpage.py renamed to examples/di/crawl_webpage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
@File : crawl_webpage.py
66
"""
77

8-
from metagpt.roles.mi.interpreter import Interpreter
8+
from metagpt.roles.di.data_interpreter import DataInterpreter
99

1010

1111
async def main():
1212
prompt = """Get data from `paperlist` table in https://papercopilot.com/statistics/iclr-statistics/iclr-2024-statistics/,
1313
and save it to a csv file. paper title must include `multiagent` or `large language model`. *notice: print key variables*"""
14-
mi = Interpreter(use_tools=True)
14+
di = DataInterpreter(use_tools=True)
1515

16-
await mi.run(prompt)
16+
await di.run(prompt)
1717

1818

1919
if __name__ == "__main__":

examples/mi/data_visualization.py renamed to examples/di/data_visualization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import asyncio
22

3-
from metagpt.roles.mi.interpreter import Interpreter
3+
from metagpt.roles.di.data_interpreter import DataInterpreter
44

55

66
async def main(requirement: str = ""):
7-
mi = Interpreter(use_tools=False)
8-
await mi.run(requirement)
7+
di = DataInterpreter(use_tools=False)
8+
await di.run(requirement)
99

1010

1111
if __name__ == "__main__":

examples/mi/email_summary.py renamed to examples/di/email_summary.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77
import os
88

9-
from metagpt.roles.mi.interpreter import Interpreter
9+
from metagpt.roles.di.data_interpreter import DataInterpreter
1010

1111

1212
async def main():
@@ -22,9 +22,9 @@ async def main():
2222
Firstly, Please help me fetch the latest 5 senders and full letter contents.
2323
Then, summarize each of the 5 emails into one sentence (you can do this by yourself, no need to import other models to do this) and output them in a markdown format."""
2424

25-
mi = Interpreter(use_tools=True)
25+
di = DataInterpreter(use_tools=True)
2626

27-
await mi.run(prompt)
27+
await di.run(prompt)
2828

2929

3030
if __name__ == "__main__":

examples/mi/imitate_webpage.py renamed to examples/di/imitate_webpage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@Author : mannaandpoem
66
@File : imitate_webpage.py
77
"""
8-
from metagpt.roles.mi.interpreter import Interpreter
8+
from metagpt.roles.di.data_interpreter import DataInterpreter
99

1010

1111
async def main():
@@ -15,9 +15,9 @@ async def main():
1515
Secondly, convert image to a webpage including HTML, CSS and JS in one go.
1616
Finally, save webpage in a text file.
1717
Note: All required dependencies and environments have been fully installed and configured."""
18-
mi = Interpreter(use_tools=True)
18+
di = DataInterpreter(use_tools=True)
1919

20-
await mi.run(prompt)
20+
await di.run(prompt)
2121

2222

2323
if __name__ == "__main__":

examples/mi/machine_learning.py renamed to examples/di/machine_learning.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import fire
22

3-
from metagpt.roles.mi.interpreter import Interpreter
3+
from metagpt.roles.di.data_interpreter import DataInterpreter
44

55

66
async def main(auto_run: bool = True):
77
requirement = "Run data analysis on sklearn Wine recognition dataset, include a plot, and train a model to predict wine class (20% as validation), and show validation accuracy."
8-
mi = Interpreter(auto_run=auto_run)
9-
await mi.run(requirement)
8+
di = DataInterpreter(auto_run=auto_run)
9+
await di.run(requirement)
1010

1111

1212
if __name__ == "__main__":

examples/mi/ml_engineer_with_tools.py renamed to examples/di/ml_engineer_with_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import asyncio
22

3-
from metagpt.roles.mi.ml_engineer import MLEngineer
3+
from metagpt.roles.di.ml_engineer import MLEngineer
44

55

66
async def main(requirement: str):

examples/mi/ocr_receipt.py renamed to examples/di/ocr_receipt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from metagpt.roles.mi.interpreter import Interpreter
1+
from metagpt.roles.di.data_interpreter import DataInterpreter
22

33

44
async def main():
@@ -8,9 +8,9 @@ async def main():
88
requirement = f"""This is a {language} receipt image.
99
Your goal is to perform OCR on images using PaddleOCR, then extract the total amount from ocr text results, and finally save as table. Image path: {image_path}.
1010
NOTE: The environments for Paddle and PaddleOCR are all ready and has been fully installed."""
11-
mi = Interpreter()
11+
di = DataInterpreter()
1212

13-
await mi.run(requirement)
13+
await di.run(requirement)
1414

1515

1616
if __name__ == "__main__":

examples/mi/rm_image_background.py renamed to examples/di/rm_image_background.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import asyncio
22

3-
from metagpt.roles.mi.interpreter import Interpreter
3+
from metagpt.roles.di.data_interpreter import DataInterpreter
44

55

66
async def main(requirement: str = ""):
7-
mi = Interpreter(use_tools=False)
8-
await mi.run(requirement)
7+
di = DataInterpreter(use_tools=False)
8+
await di.run(requirement)
99

1010

1111
if __name__ == "__main__":

0 commit comments

Comments
 (0)