use default cn language

This commit is contained in:
geekan 2023-07-03 15:19:22 +08:00
parent edefff8f04
commit 16b0932540
4 changed files with 141 additions and 141 deletions

View file

@ -1,81 +1,81 @@
# MetaGPT: The Multi-Role Meta Programming Framework
# MetaGPT:多角色元编程框架
<p align="center">
<a href=""><img src="resources/MetaGPT-logo.jpeg" alt="MetaGPT logo: Enable GPT to work in software company, collaborating to tackle more complex tasks." width="150px"></a>
<a href=""><img src="resources/MetaGPT-logo.jpeg" alt="MetaGPT logo: 使 GPT 以软件公司的形式工作,协作处理更复杂的任务" width="150px"></a>
</p>
<p align="center">
<b>Enable GPT to work in software company, collaborating to tackle more complex tasks.</b>
<b>使 GPT 以软件公司的形式工作,协作处理更复杂的任务</b>
</p>
<p align="center">
<a href="README_CN.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
<a href="README.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
<a href="README.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
<a href="README_EN.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
<a href="https://discord.gg/wCp6Q3fsAk"><img src="https://dcbadge.vercel.app/api/server/wCp6Q3fsAk?compact=true&style=flat" alt="Discord Follow"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
<a href="https://twitter.com/DeepWisdom2019"><img src="https://img.shields.io/twitter/follow/MetaGPT?style=social" alt="Twitter Follow"></a>
</p>
1. The team can handle **Boss's one line Requirement** cooperate and generate **user stories / competetive analysis / requirements / data structures / apis / files etc.**
2. The team consists of **product manager / architect / project manager / engineer**, it provides the full process of a **software company.**
1. 该团队可以消化**一句话的老板需求**合作并生成**用户故事 / 竞品分析 / 需求 / 数据结构 / APIs / 文件等**
2. 该团队包括**产品经理 / 架构师 / 项目经理 / 工程师**,它提供了一个**软件公司**的全过程
![A software company consists of LLM-based roles](./resources/software_company_cd.jpeg)
![一个完全由大语言模型角色构成的软件公司](./resources/software_company_cd.jpeg)
## Examples (fully generated by GPT-4)
## 示例(均由 GPT-4 生成)
For example, if you type `python startup.py "Design a RecSys like Toutiao"`, you would get many outputs, one of them is data & api design
例如,键入`python startup.py "写个类似今日头条的推荐系统"`并回车你会获得一系列输出其一是数据结构与API设计
![Jinri Toutiao Recsys Data & API Design](resources/workspace/content_rec_sys/resources/data_api_design.png)
![今日头条 Recsys 数据 & API 设计](resources/workspace/content_rec_sys/resources/data_api_design.png)
It requires around **$0.2** (GPT-4 api's costs) to generate one example with analysis and design, around **$2.0** to a full project.
这需要大约**0.2美元**GPT-4 API的费用来生成一个带有分析和设计的示例大约2.0美元用于一个完整的项目
## Installation
## 安装
```bash
# Step 1: Ensure that NPM is installed on your system. Then install mermaid-js.
# 第 1 步:确保您的系统上安装了 NPM。并使用npm安装mermaid-js
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
# Step 2: Ensure that Python 3.9+ is installed on your system. You can check this by using:
# 第 2 步:确保您的系统上安装了 Python 3.9+。您可以使用以下命令进行检查:
python --version
# Step 3: Clone the repository to your local machine, and install it.
# 第 3 步:克隆仓库到您的本地机器,并进行安装。
git clone https://github.com/geekan/metagpt
cd metagpt
python setup.py install
```
## Configuration
## 配置
- Configure your `OPENAI_API_KEY` in any of `config/key.yaml / config/config.yaml / env`
- Priority order: `config/key.yaml > config/config.yaml > env`
- `config/key.yaml / config/config.yaml / env` 中配置您的 `OPENAI_API_KEY`
- 优先级顺序:`config/key.yaml > config/config.yaml > env`
```bash
# Copy the configuration file and make the necessary modifications.
# 复制配置文件并进行必要的修改。
cp config/config.yaml config/key.yaml
```
| Variable Name | config/key.yaml | env |
| 变量名 | config/key.yaml | env |
|--------------------------------------------|-------------------------------------------|--------------------------------|
| OPENAI_API_KEY # Replace with your own key | OPENAI_API_KEY: "sk-..." | export OPENAI_API_KEY="sk-..." |
| OPENAI_API_BASE # Optional | OPENAI_API_BASE: "https://<YOUR_SITE>/v1" | export OPENAI_API_BASE="https://<YOUR_SITE>/v1" |
| OPENAI_API_KEY # 用您自己的密钥替换 | OPENAI_API_KEY: "sk-..." | export OPENAI_API_KEY="sk-..." |
| OPENAI_API_BASE # 可选 | OPENAI_API_BASE: "https://<YOUR_SITE>/v1" | export OPENAI_API_BASE="https://<YOUR_SITE>/v1" |
## Tutorial: Initiating a startup
## 示例:启动一个创业公司
```shell
python startup.py "Write a cli snake game"
python startup.py "写一个命令行贪吃蛇"
```
After running the script, you can find your new project in the `workspace/` directory.
运行脚本后,您可以在 `workspace/` 目录中找到您的新项目。
### Code walkthrough
### 代码实现
```python
from metagpt.software_company import SoftwareCompany
from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer
async def startup(idea: str, investment: str = '$3.0', n_round: int = 5):
"""Run a startup. Be a boss."""
"""运行一个创业公司。做一个老板"""
company = SoftwareCompany()
company.hire([ProductManager(), Architect(), ProjectManager(), Engineer()])
company.invest(investment)
@ -83,17 +83,23 @@ ### Code walkthrough
await company.run(n_round=n_round)
```
You can check `examples` for more details on single role (with knowledge base) and LLM only examples.
你可以查看`examples`其中有单角色带知识库的使用例子与仅LLM的使用例子。
## Contact Information
## 联系信息
If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
如果您对这个项目有任何问题或反馈,欢迎联系我们。我们非常欢迎您的建议!
- **Email:** alexanderwu@fuzhi.ai
- **GitHub Issues:** For more technical inquiries, you can also create a new issue in our [GitHub repository](https://github.com/geekan/metagpt/issues).
- **邮箱:** alexanderwu@fuzhi.ai
- **GitHub 问题:** 对于更技术性的问题,您也可以在我们的 [GitHub 仓库](https://github.com/geekan/metagpt/issues) 中创建一个新的问题。
We will respond to all inquiries within 2-3 business days.
我们会在2-3个工作日内回复所有的查询。
## Demo
## 演示
https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d
## 加入微信讨论群
[//]: # (![MetaGPT WeChat Discuss Group]&#40;./resources/MetaGPT-WeChat-Group.jpeg&#41;{:height="50%" width="50%"})
<img src="./resources/MetaGPT-WeChat-Group-Simple.png" width = "30%" height = "30%" alt="MetaGPT WeChat Discuss Group" align=center />

View file

@ -1,105 +0,0 @@
# MetaGPT多角色元编程框架
<p align="center">
<a href=""><img src="resources/MetaGPT-logo.jpeg" alt="MetaGPT logo: 使 GPT 以软件公司的形式工作,协作处理更复杂的任务" width="150px"></a>
</p>
<p align="center">
<b>使 GPT 以软件公司的形式工作,协作处理更复杂的任务</b>
</p>
<p align="center">
<a href="README_CN.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
<a href="README.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
<a href="https://discord.gg/wCp6Q3fsAk"><img src="https://dcbadge.vercel.app/api/server/wCp6Q3fsAk?compact=true&style=flat" alt="Discord Follow"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
<a href="https://twitter.com/DeepWisdom2019"><img src="https://img.shields.io/twitter/follow/MetaGPT?style=social" alt="Twitter Follow"></a>
</p>
1. 该团队可以消化**一句话的老板需求**合作并生成**用户故事 / 竞品分析 / 需求 / 数据结构 / APIs / 文件等**
2. 该团队包括**产品经理 / 架构师 / 项目经理 / 工程师**,它提供了一个**软件公司**的全过程
![一个完全由大语言模型角色构成的软件公司](./resources/software_company_cd.jpeg)
## 示例(均由 GPT-4 生成)
例如,键入`python startup.py "写个类似今日头条的推荐系统"`并回车你会获得一系列输出其一是数据结构与API设计
![今日头条 Recsys 数据 & API 设计](resources/workspace/content_rec_sys/resources/data_api_design.png)
这需要大约**0.2美元**GPT-4 API的费用来生成一个带有分析和设计的示例大约2.0美元用于一个完整的项目
## 安装
```bash
# 第 1 步:确保您的系统上安装了 NPM。并使用npm安装mermaid-js
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
# 第 2 步:确保您的系统上安装了 Python 3.9+。您可以使用以下命令进行检查:
python --version
# 第 3 步:克隆仓库到您的本地机器,并进行安装。
git clone https://github.com/geekan/metagpt
cd metagpt
python setup.py install
```
## 配置
- 在 `config/key.yaml / config/config.yaml / env` 中配置您的 `OPENAI_API_KEY`
- 优先级顺序:`config/key.yaml > config/config.yaml > env`
```bash
# 复制配置文件并进行必要的修改。
cp config/config.yaml config/key.yaml
```
| 变量名 | config/key.yaml | env |
|--------------------------------------------|-------------------------------------------|--------------------------------|
| OPENAI_API_KEY # 用您自己的密钥替换 | OPENAI_API_KEY: "sk-..." | export OPENAI_API_KEY="sk-..." |
| OPENAI_API_BASE # 可选 | OPENAI_API_BASE: "https://<YOUR_SITE>/v1" | export OPENAI_API_BASE="https://<YOUR_SITE>/v1" |
## 示例:启动一个创业公司
```shell
python startup.py "写一个命令行贪吃蛇"
```
运行脚本后,您可以在 `workspace/` 目录中找到您的新项目。
### 代码实现
```python
from metagpt.software_company import SoftwareCompany
from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer
async def startup(idea: str, investment: str = '$3.0', n_round: int = 5):
"""运行一个创业公司。做一个老板"""
company = SoftwareCompany()
company.hire([ProductManager(), Architect(), ProjectManager(), Engineer()])
company.invest(investment)
company.start_project(idea)
await company.run(n_round=n_round)
```
你可以查看`examples`其中有单角色带知识库的使用例子与仅LLM的使用例子。
## 联系信息
如果您对这个项目有任何问题或反馈,欢迎联系我们。我们非常欢迎您的建议!
- **邮箱:** alexanderwu@fuzhi.ai
- **GitHub 问题:** 对于更技术性的问题,您也可以在我们的 [GitHub 仓库](https://github.com/geekan/metagpt/issues) 中创建一个新的问题。
我们会在2-3个工作日内回复所有的查询。
## 演示
https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d
## 加入微信讨论群
[//]: # (![MetaGPT WeChat Discuss Group]&#40;./resources/MetaGPT-WeChat-Group.jpeg&#41;{:height="50%" width="50%"})
<img src="./resources/MetaGPT-WeChat-Group-Simple.png" width = "30%" height = "30%" alt="MetaGPT WeChat Discuss Group" align=center />

99
README_EN.md Normal file
View file

@ -0,0 +1,99 @@
# MetaGPT: The Multi-Role Meta Programming Framework
<p align="center">
<a href=""><img src="resources/MetaGPT-logo.jpeg" alt="MetaGPT logo: Enable GPT to work in software company, collaborating to tackle more complex tasks." width="150px"></a>
</p>
<p align="center">
<b>Enable GPT to work in software company, collaborating to tackle more complex tasks.</b>
</p>
<p align="center">
<a href="README.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
<a href="README_EN.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
<a href="https://discord.gg/wCp6Q3fsAk"><img src="https://dcbadge.vercel.app/api/server/wCp6Q3fsAk?compact=true&style=flat" alt="Discord Follow"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
<a href="https://twitter.com/DeepWisdom2019"><img src="https://img.shields.io/twitter/follow/MetaGPT?style=social" alt="Twitter Follow"></a>
</p>
1. The team can handle **Boss's one line Requirement** cooperate and generate **user stories / competetive analysis / requirements / data structures / apis / files etc.**
2. The team consists of **product manager / architect / project manager / engineer**, it provides the full process of a **software company.**
![A software company consists of LLM-based roles](./resources/software_company_cd.jpeg)
## Examples (fully generated by GPT-4)
For example, if you type `python startup.py "Design a RecSys like Toutiao"`, you would get many outputs, one of them is data & api design
![Jinri Toutiao Recsys Data & API Design](resources/workspace/content_rec_sys/resources/data_api_design.png)
It requires around **$0.2** (GPT-4 api's costs) to generate one example with analysis and design, around **$2.0** to a full project.
## Installation
```bash
# Step 1: Ensure that NPM is installed on your system. Then install mermaid-js.
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
# Step 2: Ensure that Python 3.9+ is installed on your system. You can check this by using:
python --version
# Step 3: Clone the repository to your local machine, and install it.
git clone https://github.com/geekan/metagpt
cd metagpt
python setup.py install
```
## Configuration
- Configure your `OPENAI_API_KEY` in any of `config/key.yaml / config/config.yaml / env`
- Priority order: `config/key.yaml > config/config.yaml > env`
```bash
# Copy the configuration file and make the necessary modifications.
cp config/config.yaml config/key.yaml
```
| Variable Name | config/key.yaml | env |
|--------------------------------------------|-------------------------------------------|--------------------------------|
| OPENAI_API_KEY # Replace with your own key | OPENAI_API_KEY: "sk-..." | export OPENAI_API_KEY="sk-..." |
| OPENAI_API_BASE # Optional | OPENAI_API_BASE: "https://<YOUR_SITE>/v1" | export OPENAI_API_BASE="https://<YOUR_SITE>/v1" |
## Tutorial: Initiating a startup
```shell
python startup.py "Write a cli snake game"
```
After running the script, you can find your new project in the `workspace/` directory.
### Code walkthrough
```python
from metagpt.software_company import SoftwareCompany
from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer
async def startup(idea: str, investment: str = '$3.0', n_round: int = 5):
"""Run a startup. Be a boss."""
company = SoftwareCompany()
company.hire([ProductManager(), Architect(), ProjectManager(), Engineer()])
company.invest(investment)
company.start_project(idea)
await company.run(n_round=n_round)
```
You can check `examples` for more details on single role (with knowledge base) and LLM only examples.
## Contact Information
If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
- **Email:** alexanderwu@fuzhi.ai
- **GitHub Issues:** For more technical inquiries, you can also create a new issue in our [GitHub repository](https://github.com/geekan/metagpt/issues).
We will respond to all inquiries within 2-3 business days.
## Demo
https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d

View file

@ -22,7 +22,7 @@ class InstallMermaidCLI(Command):
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
with open(path.join(here, "README_EN.md"), encoding="utf-8") as f:
long_description = f.read()
with open(path.join(here, "requirements.txt"), encoding="utf-8") as f: