mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
unified Interpreter naming
This commit is contained in:
parent
e2b2ff32da
commit
82a0d03e31
38 changed files with 91 additions and 91 deletions
|
|
@ -1,18 +0,0 @@
|
|||
# Code Interpreter (CI)
|
||||
|
||||
## What is CodeInterpreter
|
||||
CodeInterpreter 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.
|
||||
|
||||
## Example List
|
||||
- Data visualization
|
||||
- Machine learning modeling
|
||||
- Image background removal
|
||||
- Solve math problems
|
||||
- Receipt OCR
|
||||
- Tool usage: web page imitation
|
||||
- Tool usage: web crawling
|
||||
- Tool usage: text2image
|
||||
- Tool usage: email summarization and response
|
||||
- More on the way!
|
||||
|
||||
Please see [here](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/code_interpreter/ci_intro.html) for detailed explanation.
|
||||
18
examples/mi/README.md
Normal file
18
examples/mi/README.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# MetaGPT Interpreter (MI)
|
||||
|
||||
## What is Interpreter
|
||||
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.
|
||||
|
||||
## Example List
|
||||
- Data visualization
|
||||
- Machine learning modeling
|
||||
- Image background removal
|
||||
- Solve math problems
|
||||
- Receipt OCR
|
||||
- Tool usage: web page imitation
|
||||
- Tool usage: web crawling
|
||||
- Tool usage: text2image
|
||||
- Tool usage: email summarization and response
|
||||
- More on the way!
|
||||
|
||||
Please see [here](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/interpreter/mi_intro.html) for detailed explanation.
|
||||
|
|
@ -5,15 +5,15 @@
|
|||
@File : crawl_webpage.py
|
||||
"""
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
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 variables*"""
|
||||
ci = CodeInterpreter(goal=prompt, use_tools=True)
|
||||
mi = Interpreter(use_tools=True)
|
||||
|
||||
await ci.run(prompt)
|
||||
await mi.run(prompt)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import asyncio
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main(requirement: str = ""):
|
||||
code_interpreter = CodeInterpreter(use_tools=False)
|
||||
await code_interpreter.run(requirement)
|
||||
mi = Interpreter(use_tools=False)
|
||||
await mi.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
"""
|
||||
import os
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main():
|
||||
|
|
@ -22,9 +22,9 @@ async def main():
|
|||
Firstly, Please help me fetch the latest 5 senders and full letter contents.
|
||||
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."""
|
||||
|
||||
ci = CodeInterpreter(use_tools=True)
|
||||
mi = Interpreter(use_tools=True)
|
||||
|
||||
await ci.run(prompt)
|
||||
await mi.run(prompt)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
@Author : mannaandpoem
|
||||
@File : imitate_webpage.py
|
||||
"""
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main():
|
||||
|
|
@ -15,9 +15,9 @@ Firstly, utilize Selenium and WebDriver for rendering.
|
|||
Secondly, convert image to a webpage including HTML, CSS and JS in one go.
|
||||
Finally, save webpage in a text file.
|
||||
Note: All required dependencies and environments have been fully installed and configured."""
|
||||
ci = CodeInterpreter(use_tools=True)
|
||||
mi = Interpreter(use_tools=True)
|
||||
|
||||
await ci.run(prompt)
|
||||
await mi.run(prompt)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import asyncio
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main(requirement: str):
|
||||
role = CodeInterpreter(auto_run=True, use_tools=False)
|
||||
await role.run(requirement)
|
||||
mi = Interpreter(auto_run=True, use_tools=False)
|
||||
await mi.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import asyncio
|
||||
|
||||
from metagpt.roles.ci.ml_engineer import MLEngineer
|
||||
from metagpt.roles.mi.ml_engineer import MLEngineer
|
||||
|
||||
|
||||
async def main(requirement: str):
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main():
|
||||
# Notice: pip install metagpt[ocr] before using this example
|
||||
image_path = "image.jpg"
|
||||
language = "English"
|
||||
requirement = f"""This is a {language} invoice image.
|
||||
requirement = f"""This is a {language} receipt image.
|
||||
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}.
|
||||
NOTE: The environments for Paddle and PaddleOCR are all ready and has been fully installed."""
|
||||
ci = CodeInterpreter()
|
||||
mi = Interpreter()
|
||||
|
||||
await ci.run(requirement)
|
||||
await mi.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import asyncio
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main(requirement: str = ""):
|
||||
code_interpreter = CodeInterpreter(use_tools=False)
|
||||
await code_interpreter.run(requirement)
|
||||
mi = Interpreter(use_tools=False)
|
||||
await mi.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -4,12 +4,12 @@
|
|||
# @Desc :
|
||||
import asyncio
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main(requirement: str = ""):
|
||||
code_interpreter = CodeInterpreter(use_tools=True, goal=requirement)
|
||||
await code_interpreter.run(requirement)
|
||||
mi = Interpreter(use_tools=True, goal=requirement)
|
||||
await mi.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import asyncio
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main(requirement: str = ""):
|
||||
code_interpreter = CodeInterpreter(use_tools=False)
|
||||
await code_interpreter.run(requirement)
|
||||
mi = Interpreter(use_tools=False)
|
||||
await mi.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Loading…
Add table
Add a link
Reference in a new issue