Skip to content

Commit

Permalink
Merge pull request #552 from geekan/env_refactor
Browse files Browse the repository at this point in the history
feat: RFC116 & RFC135
  • Loading branch information
garylin2099 authored Dec 15, 2023
2 parents 183d939 + aae81c1 commit f97daac
Show file tree
Hide file tree
Showing 213 changed files with 5,878 additions and 2,674 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ cover/

# Django stuff:
*.log
logs
local_settings.py
db.sqlite3
db.sqlite3-journal
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# MetaGPT: The Multi-Agent Framework

<p align="center">
Expand Down Expand Up @@ -50,9 +51,9 @@ git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT
pip3 install -e. # or pip3 install metagpt # for stable version

# Step 3: run the startup.py
# Step 3: run metagpt cli
# setup your OPENAI_API_KEY in key.yaml copy from config.yaml
python3 startup.py "Write a cli snake game"
metagpt "Write a cli snake game"

# Step 4 [Optional]: If you want to save the artifacts like diagrams such as quadrant chart, system designs, sequence flow in the workspace, you can execute the step before Step 3. By default, the framework is compatible, and the entire process can be run completely without executing this step.
# If executing, ensure that NPM is installed on your system. Then install mermaid-js. (If you don't have npm in your computer, please go to the Node.js official website to install Node.js https://nodejs.org/ and then you will have npm tool in your computer.)
Expand All @@ -78,7 +79,7 @@ docker run --rm \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python startup.py "Write a cli snake game"
metagpt "Write a cli snake game"
```

detail installation please refer to [docker_install](https://docs.deepwisdom.ai/guide/get_started/installation.html#install-with-docker)
Expand Down Expand Up @@ -117,7 +118,7 @@ Looking forward to seeing you there! 🎉

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
- **Email:** alexanderwu@deepwisdom.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 questions within 2-3 business days.
Expand Down
16 changes: 8 additions & 8 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
## Or, you can configure OPENAI_PROXY to access official OPENAI_API_BASE.
OPENAI_API_BASE: "https://api.openai.com/v1"
#OPENAI_PROXY: "http://127.0.0.1:8118"
#OPENAI_API_KEY: "YOUR_API_KEY" # set the value to sk-xxx if you host the openai interface for open llm model
OPENAI_API_MODEL: "gpt-4"
MAX_TOKENS: 1500
#OPENAI_API_KEY: "YOUR_API_KEY" # set the value to sk-xxx if you host the openai interface for open llm model
OPENAI_API_MODEL: "gpt-4-1106-preview"
MAX_TOKENS: 4096
RPM: 10

#### if Spark
Expand Down Expand Up @@ -77,8 +77,8 @@ RPM: 10

#### for Stable Diffusion
## Use SD service, based on https://github.com/AUTOMATIC1111/stable-diffusion-webui
SD_URL: "YOUR_SD_URL"
SD_T2I_API: "/sdapi/v1/txt2img"
#SD_URL: "YOUR_SD_URL"
#SD_T2I_API: "/sdapi/v1/txt2img"

#### for Execution
#LONG_TERM_MEMORY: false
Expand All @@ -93,8 +93,8 @@ SD_T2I_API: "/sdapi/v1/txt2img"
# CALC_USAGE: false

### for Research
MODEL_FOR_RESEARCHER_SUMMARY: gpt-3.5-turbo
MODEL_FOR_RESEARCHER_REPORT: gpt-3.5-turbo-16k
# MODEL_FOR_RESEARCHER_SUMMARY: gpt-3.5-turbo
# MODEL_FOR_RESEARCHER_REPORT: gpt-3.5-turbo-16k

### choose the engine for mermaid conversion,
# default is nodejs, you can change it to playwright,pyppeteer or ink
Expand All @@ -108,4 +108,4 @@ MODEL_FOR_RESEARCHER_REPORT: gpt-3.5-turbo-16k
### repair operation on the content extracted from LLM's raw output. Warning, it improves the result but not fix all cases.
# REPAIR_LLM_OUTPUT: false

PROMPT_FORMAT: json #json or markdown
# PROMPT_FORMAT: json #json or markdown
4 changes: 2 additions & 2 deletions docs/FAQ-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ MetaGPT Community - The position of Chief Evangelist rotates on a monthly basis.

1. How to change the investment amount?

1. You can view all commands by typing `python startup.py --help`
1. You can view all commands by typing `metagpt --help`

1. Which version of Python is more stable?

Expand Down Expand Up @@ -134,7 +134,7 @@ MetaGPT Community - The position of Chief Evangelist rotates on a monthly basis.

1. Configuration instructions for SD Skills: The SD interface is currently deployed based on *https://github.com/AUTOMATIC1111/stable-diffusion-webui* **For environmental configurations and model downloads, please refer to the aforementioned GitHub repository. To initiate the SD service that supports API calls, run the command specified in cmd with the parameter nowebui, i.e.,

1. > python webui.py --enable-insecure-extension-access --port xxx --no-gradio-queue --nowebui
1. > python3 webui.py --enable-insecure-extension-access --port xxx --no-gradio-queue --nowebui
1.     Once it runs without errors, the interface will be accessible after approximately 1 minute when the model finishes loading.
1. Configure SD_URL and SD_T2I_API in the config.yaml/key.yaml files.
1. ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/065295a67b0b4feea665d1372722d49d~tplv-k3u1fbpfcp-zoom-1.image)
Expand Down
8 changes: 4 additions & 4 deletions docs/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT
pip3 install -e. # 或者 pip3 install metagpt # 安装稳定版本

# 第 3 步:执行startup.py
# 第 3 步:执行metagpt
# 拷贝config.yaml为key.yaml,并设置你自己的OPENAI_API_KEY
python3 startup.py "Write a cli snake game"
metagpt "Write a cli snake game"

# 第 4 步【可选的】:如果你想在执行过程中保存像象限图、系统设计、序列流程等图表这些产物,可以在第3步前执行该步骤。默认的,框架做了兼容,在不执行该步的情况下,也可以完整跑完整个流程。
# 如果执行,确保您的系统上安装了 NPM。并使用npm安装mermaid-js
Expand All @@ -75,7 +75,7 @@ docker run --rm \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python startup.py "Write a cli snake game"
metagpt "Write a cli snake game"
```

详细的安装请安装 [docker_install](https://docs.deepwisdom.ai/zhcn/guide/get_started/installation.html#%E4%BD%BF%E7%94%A8docker%E5%AE%89%E8%A3%85)
Expand Down Expand Up @@ -114,7 +114,7 @@ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace

如果您对这个项目有任何问题或反馈,欢迎联系我们。我们非常欢迎您的建议!

- **邮箱:** alexanderwu@fuzhi.ai
- **邮箱:** alexanderwu@deepwisdom.ai
- **GitHub 问题:** 对于更技术性的问题,您也可以在我们的 [GitHub 仓库](https://github.com/geekan/metagpt/issues) 中创建一个新的问题。

我们会在2-3个工作日内回复所有问题。
Expand Down
28 changes: 14 additions & 14 deletions docs/README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace

## 例(GPT-4 で完全生成)

例えば、`python startup.py "Toutiao のような RecSys をデザインする"`と入力すると、多くの出力が得られます
例えば、`metagpt "Toutiao のような RecSys をデザインする"`と入力すると、多くの出力が得られます

![Jinri Toutiao Recsys データと API デザイン](resources/workspace/content_rec_sys/resources/data_api_design.png)

Expand All @@ -60,16 +60,16 @@ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace

```bash
# ステップ 1: Python 3.9+ がシステムにインストールされていることを確認してください。これを確認するには:
python --version
python3 --version

# ステップ 2: リポジトリをローカルマシンにクローンし、インストールする。
git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT
pip install -e.

# ステップ 3: startup.py を実行する
# ステップ 3: metagpt を実行する
# config.yaml を key.yaml にコピーし、独自の OPENAI_API_KEY を設定します
python3 startup.py "Write a cli snake game"
metagpt "Write a cli snake game"

# ステップ 4 [オプション]: 実行中に PRD ファイルなどのアーティファクトを保存する場合は、ステップ 3 の前にこのステップを実行できます。デフォルトでは、フレームワークには互換性があり、この手順を実行しなくてもプロセス全体を完了できます。
# NPM がシステムにインストールされていることを確認してください。次に mermaid-js をインストールします。(お使いのコンピューターに npm がない場合は、Node.js 公式サイトで Node.js https://nodejs.org/ をインストールしてください。)
Expand Down Expand Up @@ -178,7 +178,7 @@ docker run --rm \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python startup.py "Write a cli snake game"
metagpt "Write a cli snake game"
# コンテナを起動し、その中でコマンドを実行することもできます
docker run --name metagpt -d \
Expand All @@ -188,15 +188,15 @@ docker run --name metagpt -d \
metagpt/metagpt:latest
docker exec -it metagpt /bin/bash
$ python startup.py "Write a cli snake game"
$ metagpt "Write a cli snake game"
```

コマンド `docker run ...` は以下のことを行います:

- 特権モードで実行し、ブラウザの実行権限を得る
- ホスト設定ファイル `/opt/metagpt/config/key.yaml` をコンテナ `/app/metagpt/config/key.yaml` にマップします
- ホストディレクトリ `/opt/metagpt/workspace` をコンテナディレクトリ `/app/metagpt/workspace` にマップするs
- デモコマンド `python startup.py "Write a cli snake game"` を実行する
- デモコマンド `metagpt "Write a cli snake game"` を実行する

### 自分でイメージをビルドする

Expand Down Expand Up @@ -225,11 +225,11 @@ cp config/config.yaml config/key.yaml

```shell
# スクリプトの実行
python startup.py "Write a cli snake game"
metagpt "Write a cli snake game"
# プロジェクトの実施にエンジニアを雇わないこと
python startup.py "Write a cli snake game" --implement False
metagpt "Write a cli snake game" --no-implement
# エンジニアを雇い、コードレビューを行う
python startup.py "Write a cli snake game" --code_review True
metagpt "Write a cli snake game" --code_review
```

スクリプトを実行すると、`workspace/` ディレクトリに新しいプロジェクトが見つかります。
Expand All @@ -239,17 +239,17 @@ python startup.py "Write a cli snake game" --code_review True
要件を述べるときに、どのプラットフォームまたはツールを使用するかを指定できます。

```shell
python startup.py "pygame をベースとした cli ヘビゲームを書く"
metagpt "pygame をベースとした cli ヘビゲームを書く"
```

### 使用方法

```
会社名
startup.py - 私たちは AI で構成されたソフトウェア・スタートアップです。私たちに投資することは、無限の可能性に満ちた未来に力を与えることです。
metagpt - 私たちは AI で構成されたソフトウェア・スタートアップです。私たちに投資することは、無限の可能性に満ちた未来に力を与えることです。

シノプシス
startup.py IDEA <flags>
metagpt IDEA <flags>

説明
私たちは AI で構成されたソフトウェア・スタートアップです。私たちに投資することは、無限の可能性に満ちた未来に力を与えることです。
Expand Down Expand Up @@ -317,7 +317,7 @@ Hugging Face Space で試す

このプロジェクトに関するご質問やご意見がございましたら、お気軽にお問い合わせください。皆様のご意見をお待ちしております!

- **Email:** alexanderwu@fuzhi.ai
- **Email:** alexanderwu@deepwisdom.ai
- **GitHub Issues:** 技術的なお問い合わせについては、[GitHub リポジトリ](https://github.com/geekan/metagpt/issues) に新しい issue を作成することもできます。

ご質問には 2-3 営業日以内に回答いたします。
Expand Down
2 changes: 1 addition & 1 deletion docs/install/cli_install_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm --version
sudo npm install -g @mermaid-js/mermaid-cli

# 第 2 步:确保您的系统上安装了 Python 3.9+。您可以使用以下命令进行检查:
python --version
python3 --version

# 第 3 步:克隆仓库到您的本地机器,并进行安装。
git clone https://github.com/geekan/MetaGPT.git
Expand Down
6 changes: 3 additions & 3 deletions docs/install/docker_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ docker run --rm \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python3 startup.py "Write a cli snake game"
metagpt "Write a cli snake game"

# You can also start a container and execute commands in it
docker run --name metagpt -d \
Expand All @@ -25,15 +25,15 @@ docker run --name metagpt -d \
metagpt/metagpt:latest

docker exec -it metagpt /bin/bash
$ python3 startup.py "Write a cli snake game"
$ metagpt "Write a cli snake game"
```

The command `docker run ...` do the following things:

- Run in privileged mode to have permission to run the browser
- Map host configure file `/opt/metagpt/config/key.yaml` to container `/app/metagpt/config/key.yaml`
- Map host directory `/opt/metagpt/workspace` to container `/app/metagpt/workspace`
- Execute the demo command `python3 startup.py "Write a cli snake game"`
- Execute the demo command `metagpt "Write a cli snake game"`

### Build image by yourself

Expand Down
6 changes: 3 additions & 3 deletions docs/install/docker_install_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ docker run --rm \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python startup.py "Write a cli snake game"
metagpt "Write a cli snake game"

# 您也可以启动一个容器并在其中执行命令
docker run --name metagpt -d \
Expand All @@ -25,15 +25,15 @@ docker run --name metagpt -d \
metagpt/metagpt:latest

docker exec -it metagpt /bin/bash
$ python startup.py "Write a cli snake game"
$ metagpt "Write a cli snake game"
```

`docker run ...`做了以下事情:

- 以特权模式运行,有权限运行浏览器
- 将主机文件 `/opt/metagpt/config/key.yaml` 映射到容器文件 `/app/metagpt/config/key.yaml`
- 将主机目录 `/opt/metagpt/workspace` 映射到容器目录 `/app/metagpt/workspace`
- 执行示例命令 `python startup.py "Write a cli snake game"`
- 执行示例命令 `metagpt "Write a cli snake game"`

### 自己构建镜像

Expand Down
12 changes: 6 additions & 6 deletions docs/tutorial/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ cp config/config.yaml config/key.yaml

```shell
# Run the script
python startup.py "Write a cli snake game"
metagpt "Write a cli snake game"
# Do not hire an engineer to implement the project
python startup.py "Write a cli snake game" --implement False
metagpt "Write a cli snake game" --no-implement
# Hire an engineer and perform code reviews
python startup.py "Write a cli snake game" --code_review True
metagpt "Write a cli snake game" --code_review
```

After running the script, you can find your new project in the `workspace/` directory.
Expand All @@ -33,17 +33,17 @@ After running the script, you can find your new project in the `workspace/` dire
You can tell which platform or tool you want to use when stating your requirements.

```shell
python startup.py "Write a cli snake game based on pygame"
metagpt "Write a cli snake game based on pygame"
```

### Usage

```
NAME
startup.py - We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.
metagpt - We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.
SYNOPSIS
startup.py IDEA <flags>
metagpt IDEA <flags>
DESCRIPTION
We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorial/usage_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ cp config/config.yaml config/key.yaml
### 示例:启动一个创业公司

```shell
python startup.py "写一个命令行贪吃蛇"
metagpt "写一个命令行贪吃蛇"
# 开启code review模式会花费更多的金钱, 但是会提升代码质量和成功率
python startup.py "写一个命令行贪吃蛇" --code_review True
metagpt "写一个命令行贪吃蛇" --code_review
```

运行脚本后,您可以在 `workspace/` 目录中找到您的新项目。
Expand All @@ -29,17 +29,17 @@ python startup.py "写一个命令行贪吃蛇" --code_review True
可以在阐述需求时说明想要使用的平台或工具。
例如:
```shell
python startup.py "写一个基于pygame的命令行贪吃蛇"
metagpt "写一个基于pygame的命令行贪吃蛇"
```

### 使用

```
名称
startup.py - 我们是一家AI软件创业公司。通过投资我们,您将赋能一个充满无限可能的未来。
metagpt - 我们是一家AI软件创业公司。通过投资我们,您将赋能一个充满无限可能的未来。
概要
startup.py IDEA <flags>
metagpt IDEA <flags>
描述
我们是一家AI软件创业公司。通过投资我们,您将赋能一个充满无限可能的未来。
Expand Down
Loading

0 comments on commit f97daac

Please sign in to comment.