Skip to content

Commit

Permalink
refine docs
Browse files Browse the repository at this point in the history
  • Loading branch information
geekan committed Feb 1, 2024
1 parent 3fa2b32 commit 7e97334
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 51 deletions.
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,17 @@

### Pip installation

> Ensure that Python 3.9+ is installed on your system. You can check this by using: `python --version`.
```bash
# Step 1: Ensure that Python 3.9+ is installed on your system. You can check this by using:
# You can use conda to initialize a new python env
# conda create -n metagpt python=3.9
# conda activate metagpt
python3 --version

# Step 2: Clone the repository to your local machine for latest version, and install it.
git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT
pip3 install -e . # or pip3 install metagpt # for stable version

# Step 3: setup your LLM key in the config2.yaml file
mkdir ~/.metagpt
cp config/config2.yaml ~/.metagpt/config2.yaml
vim ~/.metagpt/config2.yaml

# Step 4: run metagpt cli
metagpt "Create a 2048 game in python"
pip install metagpt
metagpt --init-config # this will create a ~/.metagpt/config2.yaml from config/config2.yaml, modify it to your own config

# Step 5 [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.)
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
# Usage: metagpt "<create a game or a software>"
metagpt "Create a 2048 game"
```

detail installation please refer to [cli_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-stable-version)
Expand All @@ -99,7 +86,7 @@ docker run --rm \
-v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
metagpt "Write a cli snake game"
metagpt "Create a 2048 game"
```

detail installation please refer to [docker_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-with-docker)
Expand Down
27 changes: 9 additions & 18 deletions docs/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,20 @@
## 安装
### Pip安装

> 确保您的系统安装了 Python 3.9 或更高版本。您可以通过以下命令来检查:`python --version`
```bash
# 第 1 步:确保您的系统上安装了 Python 3.9+。您可以使用以下命令进行检查:
# 可以使用conda来初始化新的python环境
# 您可以使用 conda 来初始化一个新的 python 环境
# conda create -n metagpt python=3.9
# conda activate metagpt
python3 --version

# 第 2 步:克隆最新仓库到您的本地机器,并进行安装。
git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT
pip3 install -e. # 或者 pip3 install metagpt # 安装稳定版本

# 第 3 步:执行metagpt
# 拷贝config2.yaml为~/.metagpt/config2.yaml,并设置你自己的api_key
metagpt "Write a cli snake game"
pip install metagpt
metagpt --init-config # 这将会从 config/config2.yaml 创建一个 ~/.metagpt/config2.yaml,根据您的需求修改它

# 第 4 步【可选的】:如果你想在执行过程中保存像象限图、系统设计、序列流程等图表这些产物,可以在第3步前执行该步骤。默认的,框架做了兼容,在不执行该步的情况下,也可以完整跑完整个流程。
# 如果执行,确保您的系统上安装了 NPM。并使用npm安装mermaid-js
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
# 使用方法: metagpt "<创建一个游戏或软件>"
metagpt "创建一个 2048 游戏"
```

详细的安装请安装 [cli_install](https://docs.deepwisdom.ai/guide/get_started/installation.html#install-stable-version)
详细的安装请参考 [cli_install](https://docs.deepwisdom.ai/guide/get_started/installation.html#install-stable-version)

### Docker安装
> 注意:在Windows中,你需要将 "/opt/metagpt" 替换为Docker具有创建权限的目录,比如"D:\Users\x\metagpt"
Expand All @@ -78,7 +69,7 @@ docker run --rm \
metagpt "Write a cli snake game"
```

详细的安装请安装 [docker_install](https://docs.deepwisdom.ai/main/zh/guide/get_started/installation.html#%E4%BD%BF%E7%94%A8docker%E5%AE%89%E8%A3%85)
详细的安装请参考 [docker_install](https://docs.deepwisdom.ai/main/zh/guide/get_started/installation.html#%E4%BD%BF%E7%94%A8docker%E5%AE%89%E8%A3%85)

### 快速开始的演示视频
-[MetaGPT Huggingface Space](https://huggingface.co/spaces/deepwisdom/MetaGPT) 上进行体验
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Configuration

- Configure your `key` in any of `~/.metagpt/config2.yaml / config/config2.yaml`
- Configure your `api_key` in any of `~/.metagpt/config2.yaml / config/config2.yaml`
- Priority order: `~/.metagpt/config2.yaml > config/config2.yaml`

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/usage_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### 配置

-`~/.metagpt/config2.yaml / config/config2.yaml` 中配置您的 `key`
-`~/.metagpt/config2.yaml / config/config2.yaml` 中配置您的 `api_key`
- 优先级顺序:`~/.metagpt/config2.yaml > config/config2.yaml`

```bash
Expand Down
22 changes: 11 additions & 11 deletions metagpt/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@

def generate_repo(
idea,
investment,
n_round,
code_review,
run_tests,
implement,
project_name,
inc,
project_path,
reqa_file,
max_auto_summarize_code,
recover_path,
investment=3.0,
n_round=5,
code_review=True,
run_tests=False,
implement=True,
project_name="",
inc=False,
project_path="",
reqa_file="",
max_auto_summarize_code=0,
recover_path=None,
) -> ProjectRepo:
"""Run the startup logic. Can be called from CLI or other Python scripts."""
from metagpt.roles import (
Expand Down

0 comments on commit 7e97334

Please sign in to comment.