From 5daf20abebb3a48a4082e373fe37455aa81ae02a Mon Sep 17 00:00:00 2001 From: liuminhui Date: Wed, 30 Oct 2024 15:02:44 +0800 Subject: [PATCH] user cases add case file link --- src/en/guide/use_cases/agent/interpreter/crawl_webpage.md | 2 ++ .../guide/use_cases/agent/interpreter/data_visualization.md | 2 +- src/en/guide/use_cases/agent/interpreter/email_summary.md | 2 ++ .../guide/use_cases/agent/interpreter/human_interaction.md | 2 ++ src/en/guide/use_cases/agent/interpreter/image_removebg.md | 2 ++ src/en/guide/use_cases/agent/interpreter/imitate_webpage.md | 2 ++ .../guide/use_cases/agent/interpreter/machine_learning.md | 2 ++ .../agent/interpreter/machine_learning_with_tools.md | 2 ++ src/en/guide/use_cases/agent/interpreter/ocr_receipt.md | 2 ++ .../agent/interpreter/solve_mathematical_problems.md | 6 ++++++ src/en/guide/use_cases/agent/interpreter/text2image.md | 2 ++ src/en/guide/use_cases/agent/receipt_assistant.md | 4 ++-- src/en/guide/use_cases/agent/tutorial_assistant.md | 6 ++++-- src/zh/guide/use_cases/agent/interpreter/crawl_webpage.md | 2 ++ .../guide/use_cases/agent/interpreter/data_visualization.md | 2 +- src/zh/guide/use_cases/agent/interpreter/email_summary.md | 2 ++ .../guide/use_cases/agent/interpreter/human_interaction.md | 2 ++ src/zh/guide/use_cases/agent/interpreter/image_removebg.md | 2 ++ src/zh/guide/use_cases/agent/interpreter/imitate_webpage.md | 2 ++ .../guide/use_cases/agent/interpreter/machine_learning.md | 2 ++ .../agent/interpreter/machine_learning_with_tools.md | 2 ++ src/zh/guide/use_cases/agent/interpreter/ocr_receipt.md | 2 ++ .../agent/interpreter/solve_mathematical_problems.md | 2 ++ src/zh/guide/use_cases/agent/interpreter/text2image.md | 2 ++ src/zh/guide/use_cases/agent/receipt_assistant.md | 4 ++-- src/zh/guide/use_cases/agent/tutorial_assistant.md | 6 ++++-- 26 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/en/guide/use_cases/agent/interpreter/crawl_webpage.md b/src/en/guide/use_cases/agent/interpreter/crawl_webpage.md index 8e3fce78..e8375422 100644 --- a/src/en/guide/use_cases/agent/interpreter/crawl_webpage.md +++ b/src/en/guide/use_cases/agent/interpreter/crawl_webpage.md @@ -12,6 +12,8 @@ Retrieve paper information containing the keywords: `multiagent` and `large lang ### Code +[examples/di/crawl_webpage.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/crawl_webpage.py) + ```bash python examples/di/crawl_webpage.py ``` diff --git a/src/en/guide/use_cases/agent/interpreter/data_visualization.md b/src/en/guide/use_cases/agent/interpreter/data_visualization.md index baeec5d7..308ecbab 100644 --- a/src/en/guide/use_cases/agent/interpreter/data_visualization.md +++ b/src/en/guide/use_cases/agent/interpreter/data_visualization.md @@ -16,7 +16,7 @@ Use `DataInterpreter` to perform a simple data analysis and visualize the sklear python examples/di/data_visualization.py ``` -The code in `examples/di/data_visualization.py` is as follows: +The code in [examples/di/data_visualization.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/data_visualization.py) is as follows: ```python import asyncio diff --git a/src/en/guide/use_cases/agent/interpreter/email_summary.md b/src/en/guide/use_cases/agent/interpreter/email_summary.md index 60fe2bff..04673071 100644 --- a/src/en/guide/use_cases/agent/interpreter/email_summary.md +++ b/src/en/guide/use_cases/agent/interpreter/email_summary.md @@ -12,6 +12,8 @@ After logging into the email, display the sender and the body of the latest 5 em ### Code +[examples/di/email_summary.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/email_summary.py) + ```bash python examples/di/email_summary.py ``` diff --git a/src/en/guide/use_cases/agent/interpreter/human_interaction.md b/src/en/guide/use_cases/agent/interpreter/human_interaction.md index 8794bbef..f1c289d0 100644 --- a/src/en/guide/use_cases/agent/interpreter/human_interaction.md +++ b/src/en/guide/use_cases/agent/interpreter/human_interaction.md @@ -12,6 +12,8 @@ We use the same [machine learning scenario](./machine_learning.md) as an example ### Code +[examples/di/machine_learning.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/machine_learning.py) + ``` python examples/di/machine_learning.py --auto_run False ``` diff --git a/src/en/guide/use_cases/agent/interpreter/image_removebg.md b/src/en/guide/use_cases/agent/interpreter/image_removebg.md index cb5cb1c0..e391dd92 100644 --- a/src/en/guide/use_cases/agent/interpreter/image_removebg.md +++ b/src/en/guide/use_cases/agent/interpreter/image_removebg.md @@ -12,6 +12,8 @@ Use `DataInterpreter` to remove background from a picture of a dog. ### Code +[examples/di/rm_image_background.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/rm_image_background.py) + ```bash python examples/di/rm_image_background.py ``` diff --git a/src/en/guide/use_cases/agent/interpreter/imitate_webpage.md b/src/en/guide/use_cases/agent/interpreter/imitate_webpage.md index d1258666..88aa7a7c 100644 --- a/src/en/guide/use_cases/agent/interpreter/imitate_webpage.md +++ b/src/en/guide/use_cases/agent/interpreter/imitate_webpage.md @@ -12,6 +12,8 @@ Given a URL or an image of a webpage, use the MetaGPT tool integrated with GPT-4 ### Code +[examples/di/imitate_webpage.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/imitate_webpage.py) + ```bash python examples/di/imitate_webpage.py ``` diff --git a/src/en/guide/use_cases/agent/interpreter/machine_learning.md b/src/en/guide/use_cases/agent/interpreter/machine_learning.md index f6265985..8ebdd906 100644 --- a/src/en/guide/use_cases/agent/interpreter/machine_learning.md +++ b/src/en/guide/use_cases/agent/interpreter/machine_learning.md @@ -12,6 +12,8 @@ We use the [sklearn wine recognition dataset](https://scikit-learn.org/stable/da ### Code +[examples/di/machine_learning.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/machine_learning.py) + ```bash python examples/di/machine_learning.py ``` diff --git a/src/en/guide/use_cases/agent/interpreter/machine_learning_with_tools.md b/src/en/guide/use_cases/agent/interpreter/machine_learning_with_tools.md index b47bcf91..46df8f26 100644 --- a/src/en/guide/use_cases/agent/interpreter/machine_learning_with_tools.md +++ b/src/en/guide/use_cases/agent/interpreter/machine_learning_with_tools.md @@ -8,6 +8,8 @@ Use `DataInterpreter` to model and predict the [titanic](https://www.kaggle.com/ ### Code +[examples/di/machine_learning_with_tools.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/machine_learning_with_tools.py) + ```bash python examples/di/machine_learning_with_tools.py ``` diff --git a/src/en/guide/use_cases/agent/interpreter/ocr_receipt.md b/src/en/guide/use_cases/agent/interpreter/ocr_receipt.md index 33b3fecb..8cb7184d 100644 --- a/src/en/guide/use_cases/agent/interpreter/ocr_receipt.md +++ b/src/en/guide/use_cases/agent/interpreter/ocr_receipt.md @@ -14,6 +14,8 @@ Use `DataInterpreter` to perform OCR recognition on the following receipt, extra ### Code +[examples/di/ocr_receipt.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/ocr_receipt.py) + > Note: You need to install Paddle-related dependencies to run this example, execute > `pip install metagpt[ocr]` diff --git a/src/en/guide/use_cases/agent/interpreter/solve_mathematical_problems.md b/src/en/guide/use_cases/agent/interpreter/solve_mathematical_problems.md index 305dc54c..ea40e0e7 100644 --- a/src/en/guide/use_cases/agent/interpreter/solve_mathematical_problems.md +++ b/src/en/guide/use_cases/agent/interpreter/solve_mathematical_problems.md @@ -12,6 +12,12 @@ At a school, all 60 students play on at least one of three teams: Basketball, So ### Code +[examples/di/solve_math_problems.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/solve_math_problems.py) + +```bash +python examples/di/solve_math_problems.py +``` + ```python import asyncio diff --git a/src/en/guide/use_cases/agent/interpreter/text2image.md b/src/en/guide/use_cases/agent/interpreter/text2image.md index 58b5032b..fc25cd38 100644 --- a/src/en/guide/use_cases/agent/interpreter/text2image.md +++ b/src/en/guide/use_cases/agent/interpreter/text2image.md @@ -12,6 +12,8 @@ Use the text-to-image tool of stable diffusion to generate an image from a given ### Code +[examples/di/sd_tool_usage.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/sd_tool_usage.py) + ```bash python examples/di/sd_tool_usage.py ``` diff --git a/src/en/guide/use_cases/agent/receipt_assistant.md b/src/en/guide/use_cases/agent/receipt_assistant.md index b2f2b9bc..9497728c 100644 --- a/src/en/guide/use_cases/agent/receipt_assistant.md +++ b/src/en/guide/use_cases/agent/receipt_assistant.md @@ -13,7 +13,7 @@ Supports OCR recognition of invoice files in `pdf`, `png`, `jpg`, and `zip` form ### Source Code -[GitHub Source Code](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/invoice_ocr_assistant.py) +[metagpt/roles/invoice_ocr_assistant.py](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/invoice_ocr_assistant.py) ## Role Definition @@ -292,7 +292,7 @@ Supports OCR recognition of invoice files in `pdf`, `png`, `jpg`, and `zip` form ### Execution Command Example -In the project's root directory, execute the command `python3 /examples/invoice_ocr.py`. +In the project's root directory, execute the command `python3 examples/invoice_ocr.py`. ### Execution Results diff --git a/src/en/guide/use_cases/agent/tutorial_assistant.md b/src/en/guide/use_cases/agent/tutorial_assistant.md index f205fd1e..bc769e8e 100644 --- a/src/en/guide/use_cases/agent/tutorial_assistant.md +++ b/src/en/guide/use_cases/agent/tutorial_assistant.md @@ -12,7 +12,7 @@ The design approach involves using the `LLM` (Large Language Model) to initially ### Source Code -[GitHub Source Code](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/tutorial_assistant.py) +[metagpt/roles/tutorial_assistant.py](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/tutorial_assistant.py) ## Role Definition @@ -190,7 +190,9 @@ The design approach involves using the `LLM` (Large Language Model) to initially ### Execution Command Examples -Provide corresponding execution command examples. +```bash +python examples/write_tutorial.py +``` ### Execution Results diff --git a/src/zh/guide/use_cases/agent/interpreter/crawl_webpage.md b/src/zh/guide/use_cases/agent/interpreter/crawl_webpage.md index 20235962..701d9e11 100644 --- a/src/zh/guide/use_cases/agent/interpreter/crawl_webpage.md +++ b/src/zh/guide/use_cases/agent/interpreter/crawl_webpage.md @@ -12,6 +12,8 @@ ### 代码 +[examples/di/crawl_webpage.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/crawl_webpage.py) + ```bash python examples/di/crawl_webpage.py ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/data_visualization.md b/src/zh/guide/use_cases/agent/interpreter/data_visualization.md index eda85f14..7adeab88 100644 --- a/src/zh/guide/use_cases/agent/interpreter/data_visualization.md +++ b/src/zh/guide/use_cases/agent/interpreter/data_visualization.md @@ -16,7 +16,7 @@ python examples/di/data_visualization.py ``` -`examples/di/data_visualization.py`文件中的代码具体为: +[examples/di/data_visualization.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/data_visualization.py) 文件中的代码具体为: ```python import asyncio diff --git a/src/zh/guide/use_cases/agent/interpreter/email_summary.md b/src/zh/guide/use_cases/agent/interpreter/email_summary.md index 396e441f..14719c14 100644 --- a/src/zh/guide/use_cases/agent/interpreter/email_summary.md +++ b/src/zh/guide/use_cases/agent/interpreter/email_summary.md @@ -12,6 +12,8 @@ ### 代码 +[examples/di/email_summary.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/email_summary.py) + ```bash python examples/di/email_summary.py ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/human_interaction.md b/src/zh/guide/use_cases/agent/interpreter/human_interaction.md index cdb22909..2fa38c38 100644 --- a/src/zh/guide/use_cases/agent/interpreter/human_interaction.md +++ b/src/zh/guide/use_cases/agent/interpreter/human_interaction.md @@ -12,6 +12,8 @@ ### 代码 +[examples/di/machine_learning.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/machine_learning.py) + ``` python examples/di/machine_learning.py --auto_run False ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/image_removebg.md b/src/zh/guide/use_cases/agent/interpreter/image_removebg.md index 7f252a5a..908d660d 100644 --- a/src/zh/guide/use_cases/agent/interpreter/image_removebg.md +++ b/src/zh/guide/use_cases/agent/interpreter/image_removebg.md @@ -12,6 +12,8 @@ ### 代码 +[examples/di/rm_image_background.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/rm_image_background.py) + ```bash python examples/di/rm_image_background.py ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/imitate_webpage.md b/src/zh/guide/use_cases/agent/interpreter/imitate_webpage.md index 7ef1e2c9..f5d60c79 100644 --- a/src/zh/guide/use_cases/agent/interpreter/imitate_webpage.md +++ b/src/zh/guide/use_cases/agent/interpreter/imitate_webpage.md @@ -12,6 +12,8 @@ ### 代码 +[examples/di/imitate_webpage.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/imitate_webpage.py) + ```bash python examples/di/imitate_webpage.py ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/machine_learning.md b/src/zh/guide/use_cases/agent/interpreter/machine_learning.md index 7a68ff2e..90b88c90 100644 --- a/src/zh/guide/use_cases/agent/interpreter/machine_learning.md +++ b/src/zh/guide/use_cases/agent/interpreter/machine_learning.md @@ -12,6 +12,8 @@ ### 代码 +[examples/di/machine_learning.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/machine_learning.py) + ```bash python examples/di/machine_learning.py ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/machine_learning_with_tools.md b/src/zh/guide/use_cases/agent/interpreter/machine_learning_with_tools.md index a74fd1d5..97b10850 100644 --- a/src/zh/guide/use_cases/agent/interpreter/machine_learning_with_tools.md +++ b/src/zh/guide/use_cases/agent/interpreter/machine_learning_with_tools.md @@ -8,6 +8,8 @@ ### 代码 +[examples/di/machine_learning_with_tools.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/machine_learning_with_tools.py) + ```bash python examples/di/machine_learning_with_tools.py ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/ocr_receipt.md b/src/zh/guide/use_cases/agent/interpreter/ocr_receipt.md index 1082d77f..7a01aa9d 100644 --- a/src/zh/guide/use_cases/agent/interpreter/ocr_receipt.md +++ b/src/zh/guide/use_cases/agent/interpreter/ocr_receipt.md @@ -14,6 +14,8 @@ OCR,是一种识别图片中文字,得到结构化文本信息的技术手 ### 代码 +[examples/di/ocr_receipt.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/ocr_receipt.py) + > 注意:你需要事先安装Paddle相关依赖以运行此示例,可执行 > `pip install metagpt[ocr]` diff --git a/src/zh/guide/use_cases/agent/interpreter/solve_mathematical_problems.md b/src/zh/guide/use_cases/agent/interpreter/solve_mathematical_problems.md index 5d0fc69e..b62e71ce 100644 --- a/src/zh/guide/use_cases/agent/interpreter/solve_mathematical_problems.md +++ b/src/zh/guide/use_cases/agent/interpreter/solve_mathematical_problems.md @@ -12,6 +12,8 @@ At a school, all 60 students play on at least one of three teams: Basketball, So ### 代码 +[examples/di/solve_math_problems.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/solve_math_problems.py) + ```bash python examples/di/solve_math_problems.py ``` diff --git a/src/zh/guide/use_cases/agent/interpreter/text2image.md b/src/zh/guide/use_cases/agent/interpreter/text2image.md index d86dc1e5..64321ebe 100644 --- a/src/zh/guide/use_cases/agent/interpreter/text2image.md +++ b/src/zh/guide/use_cases/agent/interpreter/text2image.md @@ -12,6 +12,8 @@ Text2Image,指通过文字描述获取图片 ### 代码 +[examples/di/sd_tool_usage.py](https://github.com/geekan/MetaGPT/blob/main/examples/di/sd_tool_usage.py) + ```bash python examples/di/sd_tool_usage.py ``` diff --git a/src/zh/guide/use_cases/agent/receipt_assistant.md b/src/zh/guide/use_cases/agent/receipt_assistant.md index 7c589e30..ea1b54d8 100644 --- a/src/zh/guide/use_cases/agent/receipt_assistant.md +++ b/src/zh/guide/use_cases/agent/receipt_assistant.md @@ -13,7 +13,7 @@ ### 源码 -[GitHub Source Code](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/invoice_ocr_assistant.py) +[metagpt/roles/invoice_ocr_assistant.py](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/invoice_ocr_assistant.py) ## 角色定义 @@ -301,7 +301,7 @@ ### 执行命令样例 -在项目根目录下,执行命令行 `python3 /examples/invoice_ocr.py`。 +在项目根目录下,执行命令行 `python3 examples/invoice_ocr.py`。 ### 执行结果 diff --git a/src/zh/guide/use_cases/agent/tutorial_assistant.md b/src/zh/guide/use_cases/agent/tutorial_assistant.md index edfc44aa..58a9331c 100644 --- a/src/zh/guide/use_cases/agent/tutorial_assistant.md +++ b/src/zh/guide/use_cases/agent/tutorial_assistant.md @@ -12,7 +12,7 @@ ### 源码 -[GitHub Source Code](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/tutorial_assistant.py) +[metagpt/roles/tutorial_assistant.py](https://github.com/geekan/MetaGPT/blob/main/metagpt/roles/tutorial_assistant.py) ## 角色定义 @@ -195,7 +195,9 @@ ### 执行命令样例 -贴对应的执行命令样例 +```bash +python examples/write_tutorial.py +``` ### 执行结果