XiangJinYu commited on
Commit
fe5c39d
·
verified ·
1 Parent(s): 7021b51

add metagpt

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .coveragerc +8 -0
  2. .devcontainer/README.md +34 -0
  3. .devcontainer/devcontainer.json +27 -0
  4. .devcontainer/docker-compose.yaml +31 -0
  5. .devcontainer/postCreateCommand.sh +7 -0
  6. .dockerignore +6 -0
  7. .gitattributes +59 -35
  8. .github/ISSUE_TEMPLATE/config.yaml +5 -0
  9. .github/ISSUE_TEMPLATE/request_new_features.md +14 -0
  10. .github/ISSUE_TEMPLATE/show_me_the_bug.md +30 -0
  11. .github/PULL_REQUEST_TEMPLATE.md +19 -0
  12. .github/workflows/build-package.yaml +35 -0
  13. .github/workflows/fulltest.yaml +86 -0
  14. .github/workflows/pre-commit.yaml +31 -0
  15. .github/workflows/stale.yaml +22 -0
  16. .github/workflows/unittest.yaml +59 -0
  17. .gitignore +197 -0
  18. .pre-commit-config.yaml +29 -0
  19. Dockerfile +25 -0
  20. LICENSE +21 -0
  21. MANIFEST.in +3 -0
  22. README.md +199 -14
  23. SECURITY.md +14 -0
  24. config/config2.example.yaml +85 -0
  25. config/config2.yaml +8 -0
  26. config/examples/anthropic-claude-3-5-sonnet.yaml +5 -0
  27. config/examples/aws-bedrock.yaml +10 -0
  28. config/examples/google-gemini.yaml +4 -0
  29. config/examples/groq-llama3-70b.yaml +5 -0
  30. config/examples/huoshan_ark.yaml +5 -0
  31. config/examples/openai-gpt-3.5-turbo.yaml +5 -0
  32. config/examples/openai-gpt-4-turbo.yaml +6 -0
  33. config/examples/openrouter-llama3-70b-instruct.yaml +5 -0
  34. config/examples/spark_lite.yaml +10 -0
  35. config/puppeteer-config.json +4 -0
  36. docs/.agent-store-config.yaml.example +9 -0
  37. docs/.pylintrc +639 -0
  38. docs/.well-known/ai-plugin.json +18 -0
  39. docs/.well-known/metagpt_oas3_api.yaml +338 -0
  40. docs/.well-known/openapi.yaml +35 -0
  41. docs/.well-known/skills.yaml +161 -0
  42. docs/FAQ-EN.md +93 -0
  43. docs/README_CN.md +138 -0
  44. docs/README_FR.md +194 -0
  45. docs/README_JA.md +337 -0
  46. docs/ROADMAP.md +84 -0
  47. docs/install/cli_install.md +125 -0
  48. docs/install/cli_install_cn.md +56 -0
  49. docs/install/docker_install.md +44 -0
  50. docs/install/docker_install_cn.md +44 -0
.coveragerc ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ [run]
2
+ source =
3
+ ./metagpt/
4
+ omit =
5
+ */metagpt/ext/*
6
+ */metagpt/environment/android_env/*
7
+ */metagpt/environment/werewolf_env/*
8
+
.devcontainer/README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dev Container
2
+
3
+ This project includes a [Dev Container](https://containers.dev/), offering you a comprehensive and fully-featured development environment within a container. By leveraging the Dev Container configuration in this folder, you can seamlessly build and initiate MetaGPT locally. For detailed information, please refer to the main README in the home directory.
4
+
5
+ You can utilize this Dev Container in [GitHub Codespaces](https://github.com/features/codespaces) or with the [VS Code Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
6
+
7
+ ## GitHub Codespaces
8
+ [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/geekan/MetaGPT)
9
+
10
+ Click the button above to open this repository in a Codespace. For additional information, refer to the [GitHub documentation on creating a Codespace](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace#creating-a-codespace).
11
+
12
+ ## VS Code Dev Containers
13
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/geekan/MetaGPT)
14
+
15
+ Note: Clicking the link above opens the main repository. To open your local cloned repository, replace the URL with your username and cloned repository's name: `https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/<your-username>/<your-repo-name>`
16
+
17
+ If you have VS Code and Docker installed, use the button above to get started. This will prompt VS Code to install the Dev Containers extension if it's not already installed, clone the source code into a container volume, and set up a dev container for you.
18
+
19
+ Alternatively, follow these steps to open this repository in a container using the VS Code Dev Containers extension:
20
+
21
+ 1. For first-time users of a development container, ensure your system meets the prerequisites (e.g., Docker installation) as outlined in the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started).
22
+
23
+ 2. To open a locally cloned copy of the code:
24
+ - Fork and clone this repository to your local file system.
25
+ - Press <kbd>F1</kbd> and select the **Dev Containers: Open Folder in Container...** command.
26
+ - Choose the cloned folder, wait for the container to initialize, and start exploring!
27
+
28
+ Learn more in the [VS Code Dev Containers documentation](https://code.visualstudio.com/docs/devcontainers/containers).
29
+
30
+ ## Tips and Tricks
31
+
32
+ * When working with the same repository folder in both a container and on Windows, it's crucial to have consistent line endings to avoid numerous changes in the SCM view. The `.gitattributes` file in the root of this repository disables line ending conversion, helping to prevent this issue. For more information, see [resolving git line ending issues in containers](https://code.visualstudio.com/docs/devcontainers/tips-and-tricks#_resolving-git-line-ending-issues-in-containers-resulting-in-many-modified-files).
33
+
34
+ * If you're curious about the contents of the image used in this Dev Container, you can review it in the [devcontainers/images](https://github.com/devcontainers/images/tree/main/src/python) repository.
.devcontainer/devcontainer.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/python
3
+ {
4
+ "name": "Python 3",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "metagpt/metagpt:latest",
7
+
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ // "features": {},
10
+
11
+ // Configure tool-specific properties.
12
+ "customizations": {
13
+ // Configure properties specific to VS Code.
14
+ "vscode": {
15
+ "settings": {},
16
+ "extensions": [
17
+ "streetsidesoftware.code-spell-checker"
18
+ ]
19
+ }
20
+ },
21
+
22
+ // Use 'postCreateCommand' to run commands after the container is created.
23
+ "postCreateCommand": "./.devcontainer/postCreateCommand.sh"
24
+
25
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
26
+ // "remoteUser": "root"
27
+ }
.devcontainer/docker-compose.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3'
2
+ services:
3
+ metagpt:
4
+ build:
5
+ dockerfile: Dockerfile
6
+ context: ..
7
+ volumes:
8
+ # Update this to wherever you want VS Code to mount the folder of your project
9
+ - ..:/workspaces:cached
10
+ networks:
11
+ - metagpt-network
12
+ # environment:
13
+ # MONGO_ROOT_USERNAME: root
14
+ # MONGO_ROOT_PASSWORD: example123
15
+ # depends_on:
16
+ # - mongo
17
+ # mongo:
18
+ # image: mongo
19
+ # restart: unless-stopped
20
+ # environment:
21
+ # MONGO_INITDB_ROOT_USERNAME: root
22
+ # MONGO_INITDB_ROOT_PASSWORD: example123
23
+ # ports:
24
+ # - "27017:27017"
25
+ # networks:
26
+ # - metagpt-network
27
+
28
+ networks:
29
+ metagpt-network:
30
+ driver: bridge
31
+
.devcontainer/postCreateCommand.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Step 1: Ensure that NPM is installed on your system. Then install mermaid-js.
2
+ npm --version
3
+ sudo npm install -g @mermaid-js/mermaid-cli
4
+
5
+ # Step 2: Ensure that Python 3.9+ is installed on your system. You can check this by using:
6
+ python --version
7
+ pip install -e .
.dockerignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ workspace
2
+ tmp
3
+ build
4
+ dist
5
+ data
6
+ geckodriver.log
.gitattributes CHANGED
@@ -1,35 +1,59 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HTML code is incorrectly calculated into statistics, so ignore them
2
+ *.html linguist-detectable=false
3
+
4
+ # Auto detect text files and perform LF normalization
5
+ * text=auto eol=lf
6
+
7
+ # Ensure shell scripts use LF (Linux style) line endings on Windows
8
+ *.sh text eol=lf
9
+
10
+ # Treat specific binary files as binary and prevent line ending conversion
11
+ *.png binary
12
+ *.jpg binary
13
+ *.gif binary
14
+ *.ico binary
15
+ *.jpeg binary
16
+ *.mp3 binary
17
+ *.mp4 binary
18
+ *.zip binary
19
+ *.bin binary
20
+
21
+
22
+ # Preserve original line endings for specific document files
23
+ *.doc text eol=crlf
24
+ *.docx text eol=crlf
25
+ *.pdf binary
26
+
27
+ # Ensure source code and script files use LF line endings
28
+ *.py text eol=lf
29
+ *.js text eol=lf
30
+ *.html text eol=lf
31
+ *.css text eol=lf
32
+
33
+ # Specify custom diff driver for specific file types
34
+ *.md diff=markdown
35
+ *.json diff=json
36
+ docs/resources/aflow/AFLOW-experiment.jpg filter=lfs diff=lfs merge=lfs -text
37
+ docs/resources/aflow/AFLOW-method.jpg filter=lfs diff=lfs merge=lfs -text
38
+ docs/resources/aflow/AFLOW-performance.jpg filter=lfs diff=lfs merge=lfs -text
39
+ docs/resources/software_company_cd.jpeg filter=lfs diff=lfs merge=lfs -text
40
+ docs/resources/software_company_sd.jpeg filter=lfs diff=lfs merge=lfs -text
41
+ docs/resources/spo/SPO-closed_task_table.png filter=lfs diff=lfs merge=lfs -text
42
+ docs/resources/spo/SPO-logo.png filter=lfs diff=lfs merge=lfs -text
43
+ docs/resources/spo/SPO-method.png filter=lfs diff=lfs merge=lfs -text
44
+ docs/resources/spo/SPO-open_ended_task_figure.png filter=lfs diff=lfs merge=lfs -text
45
+ docs/resources/workspace/content_rec_sys/resources/data_api_design.png filter=lfs diff=lfs merge=lfs -text
46
+ docs/resources/workspace/llmops_framework/resources/data_api_design.png filter=lfs diff=lfs merge=lfs -text
47
+ docs/resources/workspace/llmops_framework/resources/seq_flow.png filter=lfs diff=lfs merge=lfs -text
48
+ docs/resources/workspace/match3_puzzle_game/resources/data_api_design.png filter=lfs diff=lfs merge=lfs -text
49
+ docs/resources/workspace/match3_puzzle_game/resources/seq_flow.png filter=lfs diff=lfs merge=lfs -text
50
+ docs/resources/workspace/pyrogue/resources/data_api_design.png filter=lfs diff=lfs merge=lfs -text
51
+ docs/resources/workspace/pyrogue/resources/seq_flow.png filter=lfs diff=lfs merge=lfs -text
52
+ docs/resources/workspace/search_algorithm_framework/resources/seq_flow.png filter=lfs diff=lfs merge=lfs -text
53
+ examples/data/omniparse/test03.mp4 filter=lfs diff=lfs merge=lfs -text
54
+ tests/data/andriod_assistant/demo_Contacts/labeled_screenshots/0_labeled.png filter=lfs diff=lfs merge=lfs -text
55
+ tests/data/andriod_assistant/demo_Contacts/labeled_screenshots/1_labeled.png filter=lfs diff=lfs merge=lfs -text
56
+ tests/data/invoices/invoice-1.pdf filter=lfs diff=lfs merge=lfs -text
57
+ tests/data/invoices/invoice-2.png filter=lfs diff=lfs merge=lfs -text
58
+ tests/data/invoices/invoice-3.jpg filter=lfs diff=lfs merge=lfs -text
59
+ tests/data/invoices/invoice-4.zip filter=lfs diff=lfs merge=lfs -text
.github/ISSUE_TEMPLATE/config.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: "📑 Read online docs"
4
+ url: https://docs.deepwisdom.ai/
5
+ about: Find the tutorials, use cases and blogs from the doc site.
.github/ISSUE_TEMPLATE/request_new_features.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: "🤔 Request new features"
3
+ about: There are some ideas or demands want to discuss with the official and hope to be implemented in the future.
4
+ title: ''
5
+ labels: kind/features
6
+ assignees: ''
7
+ ---
8
+
9
+ **Feature description**
10
+ <!-- Clear and direct description of the functionality of the currently submitted or proposed feature -->
11
+
12
+ **Your Feature**
13
+ <!-- Describe the idea or process of implementing the current feature. Of course, you can also paste the URL address of your Pull Request. -->
14
+ <!-- When submitting features, you need to complete the corresponding doc/tests/examples to facilitate verification by reviewers. -->
.github/ISSUE_TEMPLATE/show_me_the_bug.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: "🪲 Show me the Bug"
3
+ about: Something happened when I use MetaGPT, I want to report it and hope to get help from the official and community.
4
+ title: ''
5
+ labels: kind/bug
6
+ assignees: ''
7
+ ---
8
+
9
+ **Bug description**
10
+ <!-- Clearly and directly describe the current bug -->
11
+
12
+ **Bug solved method**
13
+ <!-- If you solved the bug, describe the idea or process to solve the current bug. Of course, you can also paste the URL address of your Pull Request. -->
14
+ <!-- If not, provide more auxiliary information to facilitate our further positioning and investigation -->
15
+
16
+ **Environment information**
17
+ <!-- Environment:System version (like ubuntu 22.04), Python version (conda python 3.7), LLM type and model (OpenAI gpt-4-1106-preview) -->
18
+
19
+ - LLM type and model name:
20
+ - System version:
21
+ - Python version:
22
+ - MetaGPT version or branch:
23
+
24
+ <!-- Dependent packagess:the packages version cause the bug(like `pydantic 1.10.8`), installation method(like `pip install metagpt` or `pip install from source` or `run in docker`) -->
25
+
26
+ - packages version:
27
+ - installation method:
28
+
29
+ **Screenshots or logs**
30
+ <!-- Screenshots or logs of the bug can help us understand the problem more quickly -->
.github/PULL_REQUEST_TEMPLATE.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ **Features**
3
+ <!-- Clear and direct description of the submit features. -->
4
+ <!-- If it's a bug fix, please also paste the issue link. -->
5
+
6
+ - xx
7
+ - yy
8
+
9
+ **Feature Docs**
10
+ <!-- The RFC, tutorial, or use cases about the feature if it's a pretty big update. If not, there is no need to fill. -->
11
+
12
+ **Influence**
13
+ <!-- Tell me the impact of the new feature and I'll focus on it. -->
14
+
15
+ **Result**
16
+ <!-- The screenshot/log of unittest/running result -->
17
+
18
+ **Other**
19
+ <!-- Something else about this PR. -->
.github/workflows/build-package.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Build and upload python package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [created, published]
7
+
8
+ jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: '3.9'
18
+ cache: 'pip'
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install -r requirements.txt
23
+ pip install -e.
24
+ pip install setuptools wheel twine
25
+ - name: Set package version
26
+ run: |
27
+ export VERSION="${GITHUB_REF#refs/tags/v}"
28
+ sed -i "s/version=.*/version=\"${VERSION}\",/" setup.py
29
+ - name: Build and publish
30
+ env:
31
+ TWINE_USERNAME: __token__
32
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
33
+ run: |
34
+ python setup.py bdist_wheel sdist
35
+ twine upload dist/*
.github/workflows/fulltest.yaml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Full Tests
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request_target:
6
+ push:
7
+ branches:
8
+ - 'main'
9
+ - 'dev'
10
+ - '*-release'
11
+ - '*-debugger'
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ environment: unittest
17
+ strategy:
18
+ matrix:
19
+ # python-version: ['3.9', '3.10', '3.11']
20
+ python-version: ['3.9']
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ ref: ${{ github.event.pull_request.head.sha }}
26
+ - name: Set up Python ${{ matrix.python-version }}
27
+ uses: actions/setup-python@v4
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+ cache: 'pip'
31
+ - name: Install dependencies
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ pip install -e .[test]
35
+ npm install -g @mermaid-js/mermaid-cli
36
+ playwright install --with-deps
37
+ - name: Run reverse proxy script for ssh service
38
+ if: contains(github.ref, '-debugger')
39
+ continue-on-error: true
40
+ env:
41
+ FPR_SERVER_ADDR: ${{ secrets.FPR_SERVER_ADDR }}
42
+ FPR_TOKEN: ${{ secrets.FPR_TOKEN }}
43
+ FPR_SSH_REMOTE_PORT: ${{ secrets.FPR_SSH_REMOTE_PORT }}
44
+ RSA_PUB: ${{ secrets.RSA_PUB }}
45
+ SSH_PORT: ${{ vars.SSH_PORT || '22'}}
46
+ run: |
47
+ echo "Run \"ssh $(whoami)@FPR_SERVER_HOST -p FPR_SSH_REMOTE_PORT\" and \"cd $(pwd)\""
48
+ mkdir -p ~/.ssh/
49
+ echo $RSA_PUB >> ~/.ssh/authorized_keys
50
+ chmod 600 ~/.ssh/authorized_keys
51
+ wget https://github.com/fatedier/frp/releases/download/v0.32.1/frp_0.32.1_linux_amd64.tar.gz -O frp.tar.gz
52
+ tar xvzf frp.tar.gz -C /opt
53
+ mv /opt/frp* /opt/frp
54
+ /opt/frp/frpc tcp --server_addr $FPR_SERVER_ADDR --token $FPR_TOKEN --local_port $SSH_PORT --remote_port $FPR_SSH_REMOTE_PORT
55
+ - name: Test with pytest
56
+ run: |
57
+ export ALLOW_OPENAI_API_CALL=0
58
+ echo "${{ secrets.METAGPT_KEY_YAML }}" | base64 -d > config/key.yaml
59
+ mkdir -p ~/.metagpt && echo "${{ secrets.METAGPT_CONFIG2_YAML }}" | base64 -d > ~/.metagpt/config2.yaml
60
+ pytest tests/ --doctest-modules --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov --durations=20 | tee unittest.txt
61
+ - name: Show coverage report
62
+ run: |
63
+ coverage report -m
64
+ - name: Show failed tests and overall summary
65
+ run: |
66
+ grep -E "FAILED tests|ERROR tests|[0-9]+ passed," unittest.txt
67
+ failed_count=$(grep -E "FAILED|ERROR" unittest.txt | wc -l)
68
+ if [[ "$failed_count" -gt 0 ]]; then
69
+ echo "$failed_count failed lines found! Task failed."
70
+ exit 1
71
+ fi
72
+ - name: Upload pytest test results
73
+ uses: actions/upload-artifact@v3
74
+ with:
75
+ name: pytest-results-${{ matrix.python-version }}
76
+ path: |
77
+ ./unittest.txt
78
+ ./htmlcov/
79
+ ./tests/data/rsp_cache_new.json
80
+ retention-days: 3
81
+ if: ${{ always() }}
82
+ # - name: Upload coverage reports to Codecov
83
+ # uses: codecov/codecov-action@v3
84
+ # env:
85
+ # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
86
+ # if: ${{ always() }}
.github/workflows/pre-commit.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Pre-commit checks
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - '**'
7
+ push:
8
+ branches:
9
+ - '**'
10
+
11
+ jobs:
12
+ pre-commit-check:
13
+ runs-on: ubuntu-latest
14
+ environment: pre-commit
15
+ steps:
16
+ - name: Checkout Source Code
17
+ uses: actions/checkout@v2
18
+
19
+ - name: Setup Python
20
+ uses: actions/setup-python@v2
21
+ with:
22
+ python-version: '3.9.17'
23
+
24
+ - name: Install pre-commit
25
+ run: pip install pre-commit
26
+
27
+ - name: Initialize pre-commit
28
+ run: pre-commit install
29
+
30
+ - name: Run pre-commit hooks
31
+ run: pre-commit run --all-files
.github/workflows/stale.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Close inactive issues
2
+ on:
3
+ schedule:
4
+ - cron: "5 0 * * *"
5
+
6
+ jobs:
7
+ close-issues:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ issues: write
11
+ pull-requests: write
12
+ steps:
13
+ - uses: actions/stale@v5
14
+ with:
15
+ days-before-issue-stale: 30
16
+ days-before-issue-close: 14
17
+ stale-issue-label: "inactive"
18
+ stale-issue-message: "This issue has no activity in the past 30 days. Please comment on the issue if you have anything to add."
19
+ close-issue-message: "This issue was closed due to 45 days of inactivity. If you feel this issue is still relevant, please reopen the issue to continue the discussion."
20
+ days-before-pr-stale: -1
21
+ days-before-pr-close: -1
22
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
.github/workflows/unittest.yaml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Unit Tests
2
+
3
+ on:
4
+ pull_request_target:
5
+ push:
6
+ branches:
7
+ - 'main'
8
+ - 'dev'
9
+ - '*-release'
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ # python-version: ['3.9', '3.10', '3.11']
17
+ python-version: ['3.9']
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ with:
22
+ ref: ${{ github.event.pull_request.head.sha }}
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v4
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+ cache: 'pip'
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install -e .[test]
32
+ npm install -g @mermaid-js/mermaid-cli
33
+ playwright install --with-deps
34
+ - name: Test with pytest
35
+ run: |
36
+ export ALLOW_OPENAI_API_CALL=0
37
+ mkdir -p ~/.metagpt && cp tests/config2.yaml ~/.metagpt/config2.yaml
38
+ pytest | tee unittest.txt
39
+ - name: Show coverage report
40
+ run: |
41
+ coverage report -m
42
+ - name: Show failed tests and overall summary
43
+ run: |
44
+ grep -E "FAILED tests|ERROR tests|[0-9]+ passed," unittest.txt
45
+ failed_count=$(grep -E "FAILED tests|ERROR tests" unittest.txt | wc -l | tr -d '[:space:]')
46
+ if [[ $failed_count -gt 0 ]]; then
47
+ echo "$failed_count failed lines found! Task failed."
48
+ exit 1
49
+ fi
50
+ - name: Upload pytest test results
51
+ uses: actions/upload-artifact@v3
52
+ with:
53
+ name: pytest-results-${{ matrix.python-version }}
54
+ path: |
55
+ ./unittest.txt
56
+ ./htmlcov/
57
+ ./tests/data/rsp_cache_new.json
58
+ retention-days: 3
59
+ if: ${{ always() }}
.gitignore ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Python template
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+ metagpt/tools/schemas/
31
+ examples/data/search_kb/*.json
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python scripts from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+ unittest.txt
58
+
59
+ # Translations
60
+ *.mo
61
+ *.pot
62
+
63
+ # Django stuff:
64
+ *.log
65
+ logs
66
+ local_settings.py
67
+ db.sqlite3
68
+ db.sqlite3-journal
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ .pybuilder/
82
+ target/
83
+
84
+ # Jupyter Notebook
85
+ .ipynb_checkpoints
86
+
87
+ # IPython
88
+ profile_default/
89
+ ipython_config.py
90
+
91
+ # pyenv
92
+ # For a library or package, you might want to ignore these files since the code is
93
+ # intended to run in multiple environments; otherwise, check them in:
94
+ # .python-version
95
+
96
+ # pipenv
97
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
99
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
100
+ # install all needed dependencies.
101
+ #Pipfile.lock
102
+
103
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
104
+ __pypackages__/
105
+
106
+ # Celery stuff
107
+ celerybeat-schedule
108
+ celerybeat.pid
109
+
110
+ # SageMath parsed files
111
+ *.sage.py
112
+
113
+ # Environments
114
+ .env
115
+ .venv
116
+ env/
117
+ venv/
118
+ ENV/
119
+ env.bak/
120
+ venv.bak/
121
+
122
+ # Spyder project settings
123
+ .spyderproject
124
+ .spyproject
125
+
126
+ # Rope project settings
127
+ .ropeproject
128
+
129
+ # mkdocs documentation
130
+ /site
131
+
132
+ # mypy
133
+ .mypy_cache/
134
+ .dmypy.json
135
+ dmypy.json
136
+
137
+ # Pyre type checker
138
+ .pyre/
139
+
140
+ # pytype static type analyzer
141
+ .pytype/
142
+
143
+ # Cython debug symbols
144
+ cython_debug/
145
+
146
+ # report
147
+ allure-report
148
+ allure-results
149
+
150
+ # idea / vscode / macos
151
+ .idea
152
+ .DS_Store
153
+ .vscode
154
+
155
+ key.yaml
156
+ /data/
157
+ data.ms
158
+ examples/nb/
159
+ examples/default__vector_store.json
160
+ examples/docstore.json
161
+ examples/graph_store.json
162
+ examples/image__vector_store.json
163
+ examples/index_store.json
164
+ .chroma
165
+ *~$*
166
+ workspace/*
167
+ tmp
168
+ metagpt/roles/idea_agent.py
169
+ .aider*
170
+ *.bak
171
+ *.bk
172
+
173
+ # output folder
174
+ output
175
+ tmp.png
176
+ .dependencies.json
177
+ tests/metagpt/utils/file_repo_git
178
+ tests/data/rsp_cache_new.json
179
+ tests/data/serdeser_storage/
180
+ *.tmp
181
+ *.png
182
+ htmlcov
183
+ htmlcov.*
184
+ cov.xml
185
+ *.dot
186
+ *.pkl
187
+ *.faiss
188
+ *-structure.csv
189
+ *-structure.json
190
+ *.dot
191
+ .python-version
192
+ *.csv
193
+ metagpt/ext/sela/results/*
194
+ .chainlit/
195
+
196
+ metagpt/ext/aflow/data
197
+ metagpt/ext/aflow/scripts/optimized
.pre-commit-config.yaml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_stages: [ commit ]
2
+
3
+ # Install
4
+ # 1. pip install metagpt[dev]
5
+ # 2. pre-commit install
6
+ # 3. pre-commit run --all-files # make sure all files are clean
7
+ repos:
8
+ - repo: https://github.com/pycqa/isort
9
+ rev: 5.11.5
10
+ hooks:
11
+ - id: isort
12
+ args: ['--profile', 'black']
13
+ exclude: >-
14
+ (?x)^(
15
+ .*__init__\.py$
16
+ )
17
+
18
+ - repo: https://github.com/astral-sh/ruff-pre-commit
19
+ # Ruff version.
20
+ rev: v0.0.284
21
+ hooks:
22
+ - id: ruff
23
+ args: [ --fix ]
24
+
25
+ - repo: https://github.com/psf/black
26
+ rev: 23.3.0
27
+ hooks:
28
+ - id: black
29
+ args: ['--line-length', '120']
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a base image with Python3.9 and Nodejs20 slim version
2
+ FROM nikolaik/python-nodejs:python3.9-nodejs20-slim
3
+
4
+ # Install Debian software needed by MetaGPT and clean up in one RUN command to reduce image size
5
+ RUN apt update &&\
6
+ apt install -y libgomp1 git chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends &&\
7
+ apt clean && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Install Mermaid CLI globally
10
+ ENV CHROME_BIN="/usr/bin/chromium" \
11
+ puppeteer_config="/app/metagpt/config/puppeteer-config.json"\
12
+ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
13
+ RUN npm install -g @mermaid-js/mermaid-cli &&\
14
+ npm cache clean --force
15
+
16
+ # Install Python dependencies and install MetaGPT
17
+ COPY . /app/metagpt
18
+ WORKDIR /app/metagpt
19
+ RUN mkdir workspace &&\
20
+ pip install --no-cache-dir -r requirements.txt &&\
21
+ pip install -e .
22
+
23
+ # Running with an infinite loop using the tail command
24
+ CMD ["sh", "-c", "tail -f /dev/null"]
25
+
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License
2
+
3
+ Copyright (c) 2024 Chenglin Wu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
MANIFEST.in ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ recursive-include metagpt/ext/stanford_town/prompts *.txt
2
+ recursive-include metagpt/ext/stanford_town/static_dirs *.csv
3
+ recursive-include metagpt/ext/stanford_town/static_dirs *.json
README.md CHANGED
@@ -1,14 +1,199 @@
1
- ---
2
- title: SPO
3
- emoji: 🌖
4
- colorFrom: pink
5
- colorTo: pink
6
- sdk: streamlit
7
- sdk_version: 1.42.0
8
- app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
- short_description: Self-Supervised Prompt Optimization
12
- ---
13
-
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # MetaGPT: The Multi-Agent Framework
3
+
4
+ <p align="center">
5
+ <a href=""><img src="docs/resources/MetaGPT-new-log.png" alt="MetaGPT logo: Enable GPT to work in a software company, collaborating to tackle more complex tasks." width="150px"></a>
6
+ </p>
7
+
8
+ <p align="center">
9
+ <b>Assign different roles to GPTs to form a collaborative entity for complex tasks.</b>
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="docs/README_CN.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
14
+ <a href="README.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
15
+ <a href="docs/README_FR.md"><img src="https://img.shields.io/badge/document-French-blue.svg" alt="FR doc"></a>
16
+ <a href="docs/README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-blue.svg" alt="JA doc"></a>
17
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
18
+ <a href="docs/ROADMAP.md"><img src="https://img.shields.io/badge/ROADMAP-路线图-blue" alt="roadmap"></a>
19
+ <a href="https://discord.gg/DYn29wFk9z"><img src="https://dcbadge.vercel.app/api/server/DYn29wFk9z?style=flat" alt="Discord Follow"></a>
20
+ <a href="https://twitter.com/MetaGPT_"><img src="https://img.shields.io/twitter/follow/MetaGPT?style=social" alt="Twitter Follow"></a>
21
+ </p>
22
+
23
+ <p align="center">
24
+ <a href="https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/geekan/MetaGPT"><img src="https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode" alt="Open in Dev Containers"></a>
25
+ <a href="https://codespaces.new/geekan/MetaGPT"><img src="https://img.shields.io/badge/Github_Codespace-Open-blue?logo=github" alt="Open in GitHub Codespaces"></a>
26
+ <a href="https://huggingface.co/spaces/deepwisdom/MetaGPT-SoftwareCompany" target="_blank"><img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20-Hugging%20Face-blue?color=blue&logoColor=white" /></a>
27
+ </p>
28
+
29
+ ## News
30
+ 🚀 Oct. 29, 2024: We introduced three papers: [AFLOW](https://arxiv.org/abs/2410.10762), [FACT](https://arxiv.org/abs/2410.21012), and [SELA](https://arxiv.org/abs/2410.17238), check the [code](examples)!
31
+
32
+ 🚀 Mar. 29, 2024: [v0.8.0](https://github.com/geekan/MetaGPT/releases/tag/v0.8.0) released. Now you can use Data Interpreter ([arxiv](https://arxiv.org/abs/2402.18679), [example](https://docs.deepwisdom.ai/main/en/DataInterpreter/), [code](https://github.com/geekan/MetaGPT/tree/main/examples/di)) via pypi package import. Meanwhile, we integrated the RAG module and supported multiple new LLMs.
33
+
34
+ 🚀 Feb. 08, 2024: [v0.7.0](https://github.com/geekan/MetaGPT/releases/tag/v0.7.0) released, supporting assigning different LLMs to different Roles. We also introduced [Data Interpreter](https://github.com/geekan/MetaGPT/blob/main/examples/di/README.md), a powerful agent capable of solving a wide range of real-world problems.
35
+
36
+ 🚀 Jan. 16, 2024: Our paper [MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
37
+ ](https://openreview.net/forum?id=VtmBAGCN7o) accepted for **oral presentation (top 1.2%)** at ICLR 2024, **ranking #1** in the LLM-based Agent category.
38
+
39
+ 🚀 Jan. 03, 2024: [v0.6.0](https://github.com/geekan/MetaGPT/releases/tag/v0.6.0) released, new features include serialization, upgraded OpenAI package and supported multiple LLM, provided [minimal example for debate](https://github.com/geekan/MetaGPT/blob/main/examples/debate_simple.py) etc.
40
+
41
+ 🚀 Dec. 15, 2023: [v0.5.0](https://github.com/geekan/MetaGPT/releases/tag/v0.5.0) released, introducing some experimental features such as incremental development, multilingual, multiple programming languages, etc.
42
+
43
+ 🔥 Nov. 08, 2023: MetaGPT is selected into [Open100: Top 100 Open Source achievements](https://www.benchcouncil.org/evaluation/opencs/annual.html).
44
+
45
+ 🔥 Sep. 01, 2023: MetaGPT tops GitHub Trending Monthly for the **17th time** in August 2023.
46
+
47
+ 🌟 Jun. 30, 2023: MetaGPT is now open source.
48
+
49
+ 🌟 Apr. 24, 2023: First line of MetaGPT code committed.
50
+
51
+ ## Software Company as Multi-Agent System
52
+
53
+ 1. MetaGPT takes a **one line requirement** as input and outputs **user stories / competitive analysis / requirements / data structures / APIs / documents, etc.**
54
+ 2. Internally, MetaGPT includes **product managers / architects / project managers / engineers.** It provides the entire process of a **software company along with carefully orchestrated SOPs.**
55
+ 1. `Code = SOP(Team)` is the core philosophy. We materialize SOP and apply it to teams composed of LLMs.
56
+
57
+ ![A software company consists of LLM-based roles](docs/resources/software_company_cd.jpeg)
58
+
59
+ <p align="center">Software Company Multi-Agent Schematic (Gradually Implementing)</p>
60
+
61
+ ## Get Started
62
+
63
+ ### Installation
64
+
65
+ > Ensure that Python 3.9 or later, but less than 3.12, is installed on your system. You can check this by using: `python --version`.
66
+ > You can use conda like this: `conda create -n metagpt python=3.9 && conda activate metagpt`
67
+
68
+ ```bash
69
+ pip install --upgrade metagpt
70
+ # or `pip install --upgrade git+https://github.com/geekan/MetaGPT.git`
71
+ # or `git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .`
72
+ ```
73
+
74
+ For detailed installation guidance, please refer to [cli_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-stable-version)
75
+ or [docker_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-with-docker)
76
+
77
+ ### Configuration
78
+
79
+ You can init the config of MetaGPT by running the following command, or manually create `~/.metagpt/config2.yaml` file:
80
+ ```bash
81
+ # Check https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html for more details
82
+ metagpt --init-config # it will create ~/.metagpt/config2.yaml, just modify it to your needs
83
+ ```
84
+
85
+ You can configure `~/.metagpt/config2.yaml` according to the [example](https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml) and [doc](https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html):
86
+
87
+ ```yaml
88
+ llm:
89
+ api_type: "openai" # or azure / ollama / groq etc. Check LLMType for more options
90
+ model: "gpt-4-turbo" # or gpt-3.5-turbo
91
+ base_url: "https://api.openai.com/v1" # or forward url / other llm url
92
+ api_key: "YOUR_API_KEY"
93
+ ```
94
+
95
+ ### Usage
96
+
97
+ After installation, you can use MetaGPT at CLI
98
+
99
+ ```bash
100
+ metagpt "Create a 2048 game" # this will create a repo in ./workspace
101
+ ```
102
+
103
+ or use it as library
104
+
105
+ ```python
106
+ from metagpt.software_company import generate_repo, ProjectRepo
107
+ repo: ProjectRepo = generate_repo("Create a 2048 game") # or ProjectRepo("<path>")
108
+ print(repo) # it will print the repo structure with files
109
+ ```
110
+
111
+ You can also use [Data Interpreter](https://github.com/geekan/MetaGPT/tree/main/examples/di) to write code:
112
+
113
+ ```python
114
+ import asyncio
115
+ from metagpt.roles.di.data_interpreter import DataInterpreter
116
+
117
+ async def main():
118
+ di = DataInterpreter()
119
+ await di.run("Run data analysis on sklearn Iris dataset, include a plot")
120
+
121
+ asyncio.run(main()) # or await main() in a jupyter notebook setting
122
+ ```
123
+
124
+
125
+ ### QuickStart & Demo Video
126
+ - Try it on [MetaGPT Huggingface Space](https://huggingface.co/spaces/deepwisdom/MetaGPT-SoftwareCompany)
127
+ - [Matthew Berman: How To Install MetaGPT - Build A Startup With One Prompt!!](https://youtu.be/uT75J_KG_aY)
128
+ - [Official Demo Video](https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d)
129
+
130
+ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace413419
131
+
132
+ ## Tutorial
133
+
134
+ - 🗒 [Online Document](https://docs.deepwisdom.ai/main/en/)
135
+ - 💻 [Usage](https://docs.deepwisdom.ai/main/en/guide/get_started/quickstart.html)
136
+ - 🔎 [What can MetaGPT do?](https://docs.deepwisdom.ai/main/en/guide/get_started/introduction.html)
137
+ - 🛠 How to build your own agents?
138
+ - [MetaGPT Usage & Development Guide | Agent 101](https://docs.deepwisdom.ai/main/en/guide/tutorials/agent_101.html)
139
+ - [MetaGPT Usage & Development Guide | MultiAgent 101](https://docs.deepwisdom.ai/main/en/guide/tutorials/multi_agent_101.html)
140
+ - 🧑‍💻 Contribution
141
+ - [Develop Roadmap](docs/ROADMAP.md)
142
+ - 🔖 Use Cases
143
+ - [Data Interpreter](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/interpreter/intro.html)
144
+ - [Debate](https://docs.deepwisdom.ai/main/en/guide/use_cases/multi_agent/debate.html)
145
+ - [Researcher](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/researcher.html)
146
+ - [Receipt Assistant](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/receipt_assistant.html)
147
+ - ❓ [FAQs](https://docs.deepwisdom.ai/main/en/guide/faq.html)
148
+
149
+ ## Support
150
+
151
+ ### Discord Join US
152
+
153
+ 📢 Join Our [Discord Channel](https://discord.gg/ZRHeExS6xv)! Looking forward to seeing you there! 🎉
154
+
155
+ ### Contributor form
156
+
157
+ 📝 [Fill out the form](https://airtable.com/appInfdG0eJ9J4NNL/pagK3Fh1sGclBvVkV/form) to become a contributor. We are looking forward to your participation!
158
+
159
+ ### Contact Information
160
+
161
+ If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
162
+
163
+ - **Email:** [email protected]
164
+ - **GitHub Issues:** For more technical inquiries, you can also create a new issue in our [GitHub repository](https://github.com/geekan/metagpt/issues).
165
+
166
+ We will respond to all questions within 2-3 business days.
167
+
168
+ ## Citation
169
+
170
+ To stay updated with the latest research and development, follow [@MetaGPT_](https://twitter.com/MetaGPT_) on Twitter.
171
+
172
+ To cite [MetaGPT](https://openreview.net/forum?id=VtmBAGCN7o) or [Data Interpreter](https://arxiv.org/abs/2402.18679) in publications, please use the following BibTeX entries.
173
+
174
+ ```bibtex
175
+ @inproceedings{hong2024metagpt,
176
+ title={Meta{GPT}: Meta Programming for A Multi-Agent Collaborative Framework},
177
+ author={Sirui Hong and Mingchen Zhuge and Jonathan Chen and Xiawu Zheng and Yuheng Cheng and Jinlin Wang and Ceyao Zhang and Zili Wang and Steven Ka Shing Yau and Zijuan Lin and Liyang Zhou and Chenyu Ran and Lingfeng Xiao and Chenglin Wu and J{\"u}rgen Schmidhuber},
178
+ booktitle={The Twelfth International Conference on Learning Representations},
179
+ year={2024},
180
+ url={https://openreview.net/forum?id=VtmBAGCN7o}
181
+ }
182
+ @misc{hong2024data,
183
+ title={Data Interpreter: An LLM Agent For Data Science},
184
+ author={Sirui Hong and Yizhang Lin and Bang Liu and Bangbang Liu and Binhao Wu and Danyang Li and Jiaqi Chen and Jiayi Zhang and Jinlin Wang and Li Zhang and Lingyao Zhang and Min Yang and Mingchen Zhuge and Taicheng Guo and Tuo Zhou and Wei Tao and Wenyi Wang and Xiangru Tang and Xiangtao Lu and Xiawu Zheng and Xinbing Liang and Yaying Fei and Yuheng Cheng and Zongze Xu and Chenglin Wu},
185
+ year={2024},
186
+ eprint={2402.18679},
187
+ archivePrefix={arXiv},
188
+ primaryClass={cs.AI}
189
+ }
190
+ @misc{zhang2024aflow,
191
+ title={AFlow: Automating Agentic Workflow Generation},
192
+ author={Jiayi Zhang and Jinyu Xiang and Zhaoyang Yu and Fengwei Teng and Xionghui Chen and Jiaqi Chen and Mingchen Zhuge and Xin Cheng and Sirui Hong and Jinlin Wang and Bingnan Zheng and Bang Liu and Yuyu Luo and Chenglin Wu},
193
+ year={2024},
194
+ eprint={2410.10762},
195
+ archivePrefix={arXiv},
196
+ primaryClass={cs.AI},
197
+ url={https://arxiv.org/abs/2410.10762},
198
+ }
199
+ ```
SECURITY.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ |---------|--------------------|
7
+ | 0.7.x | :x: |
8
+ | 0.6.x | :x: |
9
+ | < 0.6.x | :x: |
10
+
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ If you have any vulnerability reports, please contact [email protected] .
config/config2.example.yaml ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ llm:
2
+ api_type: "openai" # or azure / ollama / groq etc.
3
+ base_url: "YOUR_BASE_URL"
4
+ api_key: "YOUR_API_KEY"
5
+ model: "gpt-4-turbo" # or gpt-3.5-turbo
6
+ proxy: "YOUR_PROXY" # for LLM API requests
7
+ # timeout: 600 # Optional. If set to 0, default value is 300.
8
+ # Details: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
9
+ pricing_plan: "" # Optional. Use for Azure LLM when its model name is not the same as OpenAI's
10
+
11
+
12
+ # RAG Embedding.
13
+ # For backward compatibility, if the embedding is not set and the llm's api_type is either openai or azure, the llm's config will be used.
14
+ embedding:
15
+ api_type: "" # openai / azure / gemini / ollama etc. Check EmbeddingType for more options.
16
+ base_url: ""
17
+ api_key: ""
18
+ model: ""
19
+ api_version: ""
20
+ embed_batch_size: 100
21
+ dimensions: # output dimension of embedding model
22
+
23
+ repair_llm_output: true # when the output is not a valid json, try to repair it
24
+
25
+ proxy: "YOUR_PROXY" # for tools like requests, playwright, selenium, etc.
26
+
27
+ search:
28
+ api_type: "google"
29
+ api_key: "YOUR_API_KEY"
30
+ cse_id: "YOUR_CSE_ID"
31
+
32
+ browser:
33
+ engine: "playwright" # playwright/selenium
34
+ browser_type: "chromium" # playwright: chromium/firefox/webkit; selenium: chrome/firefox/edge/ie
35
+
36
+ mermaid:
37
+ engine: "pyppeteer"
38
+ pyppeteer_path: "/Applications/Google Chrome.app"
39
+
40
+ redis:
41
+ host: "YOUR_HOST"
42
+ port: 32582
43
+ password: "YOUR_PASSWORD"
44
+ db: "0"
45
+
46
+ s3:
47
+ access_key: "YOUR_ACCESS_KEY"
48
+ secret_key: "YOUR_SECRET_KEY"
49
+ endpoint: "YOUR_ENDPOINT"
50
+ secure: false
51
+ bucket: "test"
52
+
53
+
54
+ azure_tts_subscription_key: "YOUR_SUBSCRIPTION_KEY"
55
+ azure_tts_region: "eastus"
56
+
57
+ iflytek_api_id: "YOUR_APP_ID"
58
+ iflytek_api_key: "YOUR_API_KEY"
59
+ iflytek_api_secret: "YOUR_API_SECRET"
60
+
61
+ metagpt_tti_url: "YOUR_MODEL_URL"
62
+
63
+ omniparse:
64
+ api_key: "YOUR_API_KEY"
65
+ base_url: "YOUR_BASE_URL"
66
+
67
+ models:
68
+ # "YOUR_MODEL_NAME_1 or YOUR_API_TYPE_1": # model: "gpt-4-turbo" # or gpt-3.5-turbo
69
+ # api_type: "openai" # or azure / ollama / groq etc.
70
+ # base_url: "YOUR_BASE_URL"
71
+ # api_key: "YOUR_API_KEY"
72
+ # proxy: "YOUR_PROXY" # for LLM API requests
73
+ # # timeout: 600 # Optional. If set to 0, default value is 300.
74
+ # # Details: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
75
+ # pricing_plan: "" # Optional. Use for Azure LLM when its model name is not the same as OpenAI's
76
+ # "YOUR_MODEL_NAME_2 or YOUR_API_TYPE_2": # api_type: "openai" # or azure / ollama / groq etc.
77
+ # api_type: "openai" # or azure / ollama / groq etc.
78
+ # base_url: "YOUR_BASE_URL"
79
+ # api_key: "YOUR_API_KEY"
80
+ # proxy: "YOUR_PROXY" # for LLM API requests
81
+ # # timeout: 600 # Optional. If set to 0, default value is 300.
82
+ # # Details: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
83
+ # pricing_plan: "" # Optional. Use for Azure LLM when its model name is not the same as OpenAI's
84
+
85
+ agentops_api_key: "YOUR_AGENTOPS_API_KEY" # get key from https://app.agentops.ai/settings/projects
config/config2.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Full Example: https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml
2
+ # Reflected Code: https://github.com/geekan/MetaGPT/blob/main/metagpt/config2.py
3
+ # Config Docs: https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html
4
+ llm:
5
+ api_type: "openai" # or azure / ollama / groq etc.
6
+ model: "gpt-4-turbo" # or gpt-3.5-turbo
7
+ base_url: "https://api.openai.com/v1" # or forward url / other llm url
8
+ api_key: "YOUR_API_KEY"
config/examples/anthropic-claude-3-5-sonnet.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ llm:
2
+ api_type: 'claude' # or anthropic
3
+ base_url: 'https://api.anthropic.com'
4
+ api_key: 'YOUR_API_KEY'
5
+ model: 'claude-3-5-sonnet-20240620' # or 'claude-3-opus-20240229'
config/examples/aws-bedrock.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ llm:
2
+ api_type: 'bedrock'
3
+ access_key: 'YOUR_API_KEY'
4
+ secret_key: 'YOUR_API_SECRET'
5
+
6
+ region_name: "us-east-1"
7
+ model: "meta.llama2-70b-chat-v1"
8
+ # model: "anthropic.claude-3-sonnet-20240229-v1:0"
9
+ # model: "mistral.mixtral-8x7b-instruct-v0:1"
10
+ # model: "meta.llama2-13b-chat-v1"
config/examples/google-gemini.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ llm:
2
+ api_type: 'gemini'
3
+ api_key: 'YOUR_API_KEY'
4
+ model: 'gemini-pro'
config/examples/groq-llama3-70b.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ llm:
2
+ # Visit https://console.groq.com/keys to create api key
3
+ base_url: "https://api.groq.com/openai/v1"
4
+ api_key: "YOUR_API_KEY"
5
+ model: "llama3-70b-8192" # llama3-8b-8192,llama3-70b-8192,llama2-70b-4096 ,mixtral-8x7b-32768,gemma-7b-it
config/examples/huoshan_ark.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ llm:
2
+ api_type: "ark"
3
+ model: "" # your model endpoint like ep-xxx
4
+ base_url: "https://ark.cn-beijing.volces.com/api/v3"
5
+ api_key: "" # your api-key like ey……
config/examples/openai-gpt-3.5-turbo.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ llm:
2
+ api_key: "YOUR_API_KEY"
3
+ model: "gpt-3.5-turbo"
4
+ #proxy: "http://<ip>:<port>"
5
+ #base_url: "https://<forward_url>/v1"
config/examples/openai-gpt-4-turbo.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ llm:
2
+ api_key: "YOUR_API_KEY"
3
+ model: "gpt-4-turbo"
4
+ #proxy: "http://<ip>:<port>"
5
+ #base_url: "https://<forward_url>/v1"
6
+
config/examples/openrouter-llama3-70b-instruct.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ llm:
2
+ api_type: openrouter
3
+ base_url: "https://openrouter.ai/api/v1"
4
+ api_key: "YOUR_API_KEY"
5
+ model: meta-llama/llama-3-70b-instruct
config/examples/spark_lite.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # 适用于讯飞星火的spark-lite 参考 https://www.xfyun.cn/doc/spark/Web.html#_2-function-call%E8%AF%B4%E6%98%8E
2
+
3
+ llm:
4
+ api_type: "spark"
5
+ # 对应模型的url 参考 https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E
6
+ base_url: "ws(s)://spark-api.xf-yun.com/v1.1/chat"
7
+ app_id: ""
8
+ api_key: ""
9
+ api_secret: ""
10
+ domain: "general" # 取值为 [general,generalv2,generalv3,generalv3.5] 和url一一对应
config/puppeteer-config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "executablePath": "/usr/bin/chromium",
3
+ "args": ["--no-sandbox"]
4
+ }
docs/.agent-store-config.yaml.example ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ role:
2
+ name: Teacher # Referenced the `Teacher` in `metagpt/roles/teacher.py`.
3
+ module: metagpt.roles.teacher # Referenced `metagpt/roles/teacher.py`.
4
+ skills: # Refer to the skill `name` of the published skill in `docs/.well-known/skills.yaml`.
5
+ - name: text_to_speech
6
+ description: Text-to-speech
7
+ - name: text_to_image
8
+ description: Create a drawing based on the text.
9
+
docs/.pylintrc ADDED
@@ -0,0 +1,639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [MAIN]
2
+
3
+ # Analyse import fallback blocks. This can be used to support both Python 2 and
4
+ # 3 compatible code, which means that the block might have code that exists
5
+ # only in one or another interpreter, leading to false positives when analysed.
6
+ analyse-fallback-blocks=no
7
+
8
+ # Clear in-memory caches upon conclusion of linting. Useful if running pylint
9
+ # in a server-like mode.
10
+ clear-cache-post-run=no
11
+
12
+ # Load and enable all available extensions. Use --list-extensions to see a list
13
+ # all available extensions.
14
+ #enable-all-extensions=
15
+
16
+ # In error mode, messages with a category besides ERROR or FATAL are
17
+ # suppressed, and no reports are done by default. Error mode is compatible with
18
+ # disabling specific errors.
19
+ #errors-only=
20
+
21
+ # Always return a 0 (non-error) status code, even if lint errors are found.
22
+ # This is primarily useful in continuous integration scripts.
23
+ #exit-zero=
24
+
25
+ # A comma-separated list of package or module names from where C extensions may
26
+ # be loaded. Extensions are loading into the active Python interpreter and may
27
+ # run arbitrary code.
28
+ extension-pkg-allow-list=
29
+
30
+ # A comma-separated list of package or module names from where C extensions may
31
+ # be loaded. Extensions are loading into the active Python interpreter and may
32
+ # run arbitrary code. (This is an alternative name to extension-pkg-allow-list
33
+ # for backward compatibility.)
34
+ extension-pkg-whitelist=pydantic
35
+
36
+ # Return non-zero exit code if any of these messages/categories are detected,
37
+ # even if score is above --fail-under value. Syntax same as enable. Messages
38
+ # specified are enabled, while categories only check already-enabled messages.
39
+ fail-on=
40
+
41
+ # Specify a score threshold under which the program will exit with error.
42
+ fail-under=10
43
+
44
+ # Interpret the stdin as a python script, whose filename needs to be passed as
45
+ # the module_or_package argument.
46
+ #from-stdin=
47
+
48
+ # Files or directories to be skipped. They should be base names, not paths.
49
+ ignore=CVS
50
+
51
+ # Add files or directories matching the regular expressions patterns to the
52
+ # ignore-list. The regex matches against paths and can be in Posix or Windows
53
+ # format. Because '\\' represents the directory delimiter on Windows systems,
54
+ # it can't be used as an escape character.
55
+ ignore-paths=
56
+
57
+ # Files or directories matching the regular expression patterns are skipped.
58
+ # The regex matches against base names, not paths. The default value ignores
59
+ # Emacs file locks
60
+ #ignore-patterns=^\.#
61
+ ignore-patterns=(.)*_test\.py,test_(.)*\.py
62
+
63
+
64
+ # List of module names for which member attributes should not be checked
65
+ # (useful for modules/projects where namespaces are manipulated during runtime
66
+ # and thus existing member attributes cannot be deduced by static analysis). It
67
+ # supports qualified module names, as well as Unix pattern matching.
68
+ ignored-modules=
69
+
70
+ # Python code to execute, usually for sys.path manipulation such as
71
+ # pygtk.require().
72
+ #init-hook=
73
+
74
+ # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
75
+ # number of processors available to use, and will cap the count on Windows to
76
+ # avoid hangs.
77
+ jobs=1
78
+
79
+ # Control the amount of potential inferred values when inferring a single
80
+ # object. This can help the performance when dealing with large functions or
81
+ # complex, nested conditions.
82
+ limit-inference-results=120
83
+
84
+ # List of plugins (as comma separated values of python module names) to load,
85
+ # usually to register additional checkers.
86
+ load-plugins=
87
+
88
+ # Pickle collected data for later comparisons.
89
+ persistent=yes
90
+
91
+ # Minimum Python version to use for version dependent checks. Will default to
92
+ # the version used to run pylint.
93
+ py-version=3.9
94
+
95
+ # Discover python modules and packages in the file system subtree.
96
+ recursive=no
97
+
98
+ # Add paths to the list of the source roots. Supports globbing patterns. The
99
+ # source root is an absolute path or a path relative to the current working
100
+ # directory used to determine a package namespace for modules located under the
101
+ # source root.
102
+ source-roots=
103
+
104
+ # When enabled, pylint would attempt to guess common misconfiguration and emit
105
+ # user-friendly hints instead of false-positive error messages.
106
+ suggestion-mode=yes
107
+
108
+ # Allow loading of arbitrary C extensions. Extensions are imported into the
109
+ # active Python interpreter and may run arbitrary code.
110
+ unsafe-load-any-extension=no
111
+
112
+ # In verbose mode, extra non-checker-related info will be displayed.
113
+ #verbose=
114
+
115
+
116
+ [BASIC]
117
+
118
+ # Naming style matching correct argument names.
119
+ argument-naming-style=snake_case
120
+
121
+ # Regular expression matching correct argument names. Overrides argument-
122
+ # naming-style. If left empty, argument names will be checked with the set
123
+ # naming style.
124
+ #argument-rgx=
125
+
126
+ # Naming style matching correct attribute names.
127
+ attr-naming-style=snake_case
128
+
129
+ # Regular expression matching correct attribute names. Overrides attr-naming-
130
+ # style. If left empty, attribute names will be checked with the set naming
131
+ # style.
132
+ #attr-rgx=
133
+
134
+ # Bad variable names which should always be refused, separated by a comma.
135
+ bad-names=foo,
136
+ bar,
137
+ baz,
138
+ toto,
139
+ tutu,
140
+ tata
141
+
142
+ # Bad variable names regexes, separated by a comma. If names match any regex,
143
+ # they will always be refused
144
+ bad-names-rgxs=
145
+
146
+ # Naming style matching correct class attribute names.
147
+ class-attribute-naming-style=any
148
+
149
+ # Regular expression matching correct class attribute names. Overrides class-
150
+ # attribute-naming-style. If left empty, class attribute names will be checked
151
+ # with the set naming style.
152
+ #class-attribute-rgx=
153
+
154
+ # Naming style matching correct class constant names.
155
+ class-const-naming-style=UPPER_CASE
156
+
157
+ # Regular expression matching correct class constant names. Overrides class-
158
+ # const-naming-style. If left empty, class constant names will be checked with
159
+ # the set naming style.
160
+ #class-const-rgx=
161
+
162
+ # Naming style matching correct class names.
163
+ class-naming-style=PascalCase
164
+
165
+ # Regular expression matching correct class names. Overrides class-naming-
166
+ # style. If left empty, class names will be checked with the set naming style.
167
+ #class-rgx=
168
+
169
+ # Naming style matching correct constant names.
170
+ const-naming-style=UPPER_CASE
171
+
172
+ # Regular expression matching correct constant names. Overrides const-naming-
173
+ # style. If left empty, constant names will be checked with the set naming
174
+ # style.
175
+ #const-rgx=
176
+
177
+ # Minimum line length for functions/classes that require docstrings, shorter
178
+ # ones are exempt.
179
+ docstring-min-length=-1
180
+
181
+ # Naming style matching correct function names.
182
+ function-naming-style=snake_case
183
+
184
+ # Regular expression matching correct function names. Overrides function-
185
+ # naming-style. If left empty, function names will be checked with the set
186
+ # naming style.
187
+ #function-rgx=
188
+
189
+ # Good variable names which should always be accepted, separated by a comma.
190
+ good-names=i,
191
+ j,
192
+ k,
193
+ v,
194
+ e,
195
+ d,
196
+ m,
197
+ df,
198
+ ex,
199
+ Run,
200
+ _
201
+
202
+ # Good variable names regexes, separated by a comma. If names match any regex,
203
+ # they will always be accepted
204
+ good-names-rgxs=
205
+
206
+ # Include a hint for the correct naming format with invalid-name.
207
+ include-naming-hint=no
208
+
209
+ # Naming style matching correct inline iteration names.
210
+ inlinevar-naming-style=any
211
+
212
+ # Regular expression matching correct inline iteration names. Overrides
213
+ # inlinevar-naming-style. If left empty, inline iteration names will be checked
214
+ # with the set naming style.
215
+ #inlinevar-rgx=
216
+
217
+ # Naming style matching correct method names.
218
+ method-naming-style=snake_case
219
+
220
+ # Regular expression matching correct method names. Overrides method-naming-
221
+ # style. If left empty, method names will be checked with the set naming style.
222
+ #method-rgx=
223
+
224
+ # Naming style matching correct module names.
225
+ module-naming-style=snake_case
226
+
227
+ # Regular expression matching correct module names. Overrides module-naming-
228
+ # style. If left empty, module names will be checked with the set naming style.
229
+ #module-rgx=
230
+
231
+ # Colon-delimited sets of names that determine each other's naming style when
232
+ # the name regexes allow several styles.
233
+ name-group=
234
+
235
+ # Regular expression which should only match function or class names that do
236
+ # not require a docstring.
237
+ no-docstring-rgx=^_
238
+
239
+ # List of decorators that produce properties, such as abc.abstractproperty. Add
240
+ # to this list to register other decorators that produce valid properties.
241
+ # These decorators are taken in consideration only for invalid-name.
242
+ property-classes=abc.abstractproperty
243
+
244
+ # Regular expression matching correct type alias names. If left empty, type
245
+ # alias names will be checked with the set naming style.
246
+ #typealias-rgx=
247
+
248
+ # Regular expression matching correct type variable names. If left empty, type
249
+ # variable names will be checked with the set naming style.
250
+ #typevar-rgx=
251
+
252
+ # Naming style matching correct variable names.
253
+ variable-naming-style=snake_case
254
+
255
+ # Regular expression matching correct variable names. Overrides variable-
256
+ # naming-style. If left empty, variable names will be checked with the set
257
+ # naming style.
258
+ #variable-rgx=
259
+
260
+
261
+ [CLASSES]
262
+
263
+ # Warn about protected attribute access inside special methods
264
+ check-protected-access-in-special-methods=no
265
+
266
+ # List of method names used to declare (i.e. assign) instance attributes.
267
+ defining-attr-methods=__init__,
268
+ __new__,
269
+ setUp,
270
+ __post_init__
271
+
272
+ # List of member names, which should be excluded from the protected access
273
+ # warning.
274
+ exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit
275
+
276
+ # List of valid names for the first argument in a class method.
277
+ valid-classmethod-first-arg=cls
278
+
279
+ # List of valid names for the first argument in a metaclass class method.
280
+ valid-metaclass-classmethod-first-arg=mcs
281
+
282
+
283
+ [DESIGN]
284
+
285
+ # List of regular expressions of class ancestor names to ignore when counting
286
+ # public methods (see R0903)
287
+ exclude-too-few-public-methods=
288
+
289
+ # List of qualified class names to ignore when counting class parents (see
290
+ # R0901)
291
+ ignored-parents=
292
+
293
+ # Maximum number of arguments for function / method.
294
+ max-args=5
295
+
296
+ # Maximum number of attributes for a class (see R0902).
297
+ max-attributes=7
298
+
299
+ # Maximum number of boolean expressions in an if statement (see R0916).
300
+ max-bool-expr=5
301
+
302
+ # Maximum number of branch for function / method body.
303
+ max-branches=12
304
+
305
+ # Maximum number of locals for function / method body.
306
+ max-locals=15
307
+
308
+ # Maximum number of parents for a class (see R0901).
309
+ max-parents=7
310
+
311
+ # Maximum number of public methods for a class (see R0904).
312
+ max-public-methods=20
313
+
314
+ # Maximum number of return / yield for function / method body.
315
+ max-returns=6
316
+
317
+ # Maximum number of statements in function / method body.
318
+ max-statements=50
319
+
320
+ # Minimum number of public methods for a class (see R0903).
321
+ min-public-methods=2
322
+
323
+
324
+ [EXCEPTIONS]
325
+
326
+ # Exceptions that will emit a warning when caught.
327
+ overgeneral-exceptions=builtins.BaseException,builtins.Exception
328
+
329
+
330
+ [FORMAT]
331
+
332
+ # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
333
+ expected-line-ending-format=
334
+
335
+ # Regexp for a line that is allowed to be longer than the limit.
336
+ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
337
+
338
+ # Number of spaces of indent required inside a hanging or continued line.
339
+ indent-after-paren=4
340
+
341
+ # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
342
+ # tab).
343
+ indent-string=' '
344
+
345
+ # Maximum number of characters on a single line.
346
+ max-line-length=120
347
+
348
+ # Maximum number of lines in a module.
349
+ max-module-lines=1000
350
+
351
+ # Allow the body of a class to be on the same line as the declaration if body
352
+ # contains single statement.
353
+ single-line-class-stmt=no
354
+
355
+ # Allow the body of an if to be on the same line as the test if there is no
356
+ # else.
357
+ single-line-if-stmt=no
358
+
359
+
360
+ [IMPORTS]
361
+
362
+ # List of modules that can be imported at any level, not just the top level
363
+ # one.
364
+ allow-any-import-level=
365
+
366
+ # Allow explicit reexports by alias from a package __init__.
367
+ allow-reexport-from-package=no
368
+
369
+ # Allow wildcard imports from modules that define __all__.
370
+ allow-wildcard-with-all=no
371
+
372
+ # Deprecated modules which should not be used, separated by a comma.
373
+ deprecated-modules=
374
+
375
+ # Output a graph (.gv or any supported image format) of external dependencies
376
+ # to the given file (report RP0402 must not be disabled).
377
+ ext-import-graph=
378
+
379
+ # Output a graph (.gv or any supported image format) of all (i.e. internal and
380
+ # external) dependencies to the given file (report RP0402 must not be
381
+ # disabled).
382
+ import-graph=
383
+
384
+ # Output a graph (.gv or any supported image format) of internal dependencies
385
+ # to the given file (report RP0402 must not be disabled).
386
+ int-import-graph=
387
+
388
+ # Force import order to recognize a module as part of the standard
389
+ # compatibility libraries.
390
+ known-standard-library=
391
+
392
+ # Force import order to recognize a module as part of a third party library.
393
+ known-third-party=enchant
394
+
395
+ # Couples of modules and preferred modules, separated by a comma.
396
+ preferred-modules=
397
+
398
+
399
+ [LOGGING]
400
+
401
+ # The type of string formatting that logging methods do. `old` means using %
402
+ # formatting, `new` is for `{}` formatting.
403
+ logging-format-style=old
404
+
405
+ # Logging modules to check that the string format arguments are in logging
406
+ # function parameter format.
407
+ logging-modules=logging
408
+
409
+
410
+ [MESSAGES CONTROL]
411
+
412
+ # Only show warnings with the listed confidence levels. Leave empty to show
413
+ # all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
414
+ # UNDEFINED.
415
+ confidence=HIGH,
416
+ CONTROL_FLOW,
417
+ INFERENCE,
418
+ INFERENCE_FAILURE,
419
+ UNDEFINED
420
+
421
+ # Disable the message, report, category or checker with the given id(s). You
422
+ # can either give multiple identifiers separated by comma (,) or put this
423
+ # option multiple times (only on the command line, not in the configuration
424
+ # file where it should appear only once). You can also use "--disable=all" to
425
+ # disable everything first and then re-enable specific checks. For example, if
426
+ # you want to run only the similarities checker, you can use "--disable=all
427
+ # --enable=similarities". If you want to run only the classes checker, but have
428
+ # no Warning level messages displayed, use "--disable=all --enable=classes
429
+ # --disable=W".
430
+ disable=raw-checker-failed,
431
+ bad-inline-option,
432
+ locally-disabled,
433
+ file-ignored,
434
+ suppressed-message,
435
+ useless-suppression,
436
+ deprecated-pragma,
437
+ use-symbolic-message-instead,
438
+ expression-not-assigned,
439
+ pointless-statement
440
+
441
+ # Enable the message, report, category or checker with the given id(s). You can
442
+ # either give multiple identifier separated by comma (,) or put this option
443
+ # multiple time (only on the command line, not in the configuration file where
444
+ # it should appear only once). See also the "--disable" option for examples.
445
+ enable=c-extension-no-member
446
+
447
+
448
+ [METHOD_ARGS]
449
+
450
+ # List of qualified names (i.e., library.method) which require a timeout
451
+ # parameter e.g. 'requests.api.get,requests.api.post'
452
+ timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request
453
+
454
+
455
+ [MISCELLANEOUS]
456
+
457
+ # List of note tags to take in consideration, separated by a comma.
458
+ notes=FIXME,
459
+ XXX,
460
+ TODO
461
+
462
+ # Regular expression of note tags to take in consideration.
463
+ notes-rgx=
464
+
465
+
466
+ [REFACTORING]
467
+
468
+ # Maximum number of nested blocks for function / method body
469
+ max-nested-blocks=5
470
+
471
+ # Complete name of functions that never returns. When checking for
472
+ # inconsistent-return-statements if a never returning function is called then
473
+ # it will be considered as an explicit return statement and no message will be
474
+ # printed.
475
+ never-returning-functions=sys.exit,argparse.parse_error
476
+
477
+
478
+ [REPORTS]
479
+
480
+ # Python expression which should return a score less than or equal to 10. You
481
+ # have access to the variables 'fatal', 'error', 'warning', 'refactor',
482
+ # 'convention', and 'info' which contain the number of messages in each
483
+ # category, as well as 'statement' which is the total number of statements
484
+ # analyzed. This score is used by the global evaluation report (RP0004).
485
+ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
486
+
487
+ # Template used to display messages. This is a python new-style format string
488
+ # used to format the message information. See doc for all details.
489
+ msg-template=
490
+
491
+ # Set the output format. Available formats are text, parseable, colorized, json
492
+ # and msvs (visual studio). You can also give a reporter class, e.g.
493
+ # mypackage.mymodule.MyReporterClass.
494
+ #output-format=
495
+
496
+ # Tells whether to display a full report or only the messages.
497
+ reports=no
498
+
499
+ # Activate the evaluation score.
500
+ score=yes
501
+
502
+
503
+ [SIMILARITIES]
504
+
505
+ # Comments are removed from the similarity computation
506
+ ignore-comments=yes
507
+
508
+ # Docstrings are removed from the similarity computation
509
+ ignore-docstrings=yes
510
+
511
+ # Imports are removed from the similarity computation
512
+ ignore-imports=yes
513
+
514
+ # Signatures are removed from the similarity computation
515
+ ignore-signatures=yes
516
+
517
+ # Minimum lines number of a similarity.
518
+ min-similarity-lines=4
519
+
520
+
521
+ [SPELLING]
522
+
523
+ # Limits count of emitted suggestions for spelling mistakes.
524
+ max-spelling-suggestions=4
525
+
526
+ # Spelling dictionary name. No available dictionaries : You need to install
527
+ # both the python package and the system dependency for enchant to work..
528
+ spelling-dict=
529
+
530
+ # List of comma separated words that should be considered directives if they
531
+ # appear at the beginning of a comment and should not be checked.
532
+ spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
533
+
534
+ # List of comma separated words that should not be checked.
535
+ spelling-ignore-words=
536
+
537
+ # A path to a file that contains the private dictionary; one word per line.
538
+ spelling-private-dict-file=
539
+
540
+ # Tells whether to store unknown words to the private dictionary (see the
541
+ # --spelling-private-dict-file option) instead of raising a message.
542
+ spelling-store-unknown-words=no
543
+
544
+
545
+ [STRING]
546
+
547
+ # This flag controls whether inconsistent-quotes generates a warning when the
548
+ # character used as a quote delimiter is used inconsistently within a module.
549
+ check-quote-consistency=no
550
+
551
+ # This flag controls whether the implicit-str-concat should generate a warning
552
+ # on implicit string concatenation in sequences defined over several lines.
553
+ check-str-concat-over-line-jumps=no
554
+
555
+
556
+ [TYPECHECK]
557
+
558
+ # List of decorators that produce context managers, such as
559
+ # contextlib.contextmanager. Add to this list to register other decorators that
560
+ # produce valid context managers.
561
+ contextmanager-decorators=contextlib.contextmanager
562
+
563
+ # List of members which are set dynamically and missed by pylint inference
564
+ # system, and so shouldn't trigger E1101 when accessed. Python regular
565
+ # expressions are accepted.
566
+ generated-members=
567
+
568
+ # Tells whether to warn about missing members when the owner of the attribute
569
+ # is inferred to be None.
570
+ ignore-none=yes
571
+
572
+ # This flag controls whether pylint should warn about no-member and similar
573
+ # checks whenever an opaque object is returned when inferring. The inference
574
+ # can return multiple potential results while evaluating a Python object, but
575
+ # some branches might not be evaluated, which results in partial inference. In
576
+ # that case, it might be useful to still emit no-member and other checks for
577
+ # the rest of the inferred objects.
578
+ ignore-on-opaque-inference=yes
579
+
580
+ # List of symbolic message names to ignore for Mixin members.
581
+ ignored-checks-for-mixins=no-member,
582
+ not-async-context-manager,
583
+ not-context-manager,
584
+ attribute-defined-outside-init
585
+
586
+ # List of class names for which member attributes should not be checked (useful
587
+ # for classes with dynamically set attributes). This supports the use of
588
+ # qualified names.
589
+ ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
590
+
591
+ # Show a hint with possible names when a member name was not found. The aspect
592
+ # of finding the hint is based on edit distance.
593
+ missing-member-hint=yes
594
+
595
+ # The minimum edit distance a name should have in order to be considered a
596
+ # similar match for a missing member name.
597
+ missing-member-hint-distance=1
598
+
599
+ # The total number of similar names that should be taken in consideration when
600
+ # showing a hint for a missing member.
601
+ missing-member-max-choices=1
602
+
603
+ # Regex pattern to define which classes are considered mixins.
604
+ mixin-class-rgx=.*[Mm]ixin
605
+
606
+ # List of decorators that change the signature of a decorated function.
607
+ signature-mutators=
608
+
609
+
610
+ [VARIABLES]
611
+
612
+ # List of additional names supposed to be defined in builtins. Remember that
613
+ # you should avoid defining new builtins when possible.
614
+ additional-builtins=
615
+
616
+ # Tells whether unused global variables should be treated as a violation.
617
+ allow-global-unused-variables=yes
618
+
619
+ # List of names allowed to shadow builtins
620
+ allowed-redefined-builtins=
621
+
622
+ # List of strings which can identify a callback function by name. A callback
623
+ # name must start or end with one of those strings.
624
+ callbacks=cb_,
625
+ _cb
626
+
627
+ # A regular expression matching the name of dummy variables (i.e. expected to
628
+ # not be used).
629
+ dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
630
+
631
+ # Argument names that match this expression will be ignored.
632
+ ignored-argument-names=_.*|^ignored_|^unused_
633
+
634
+ # Tells whether we should check for unused import in __init__ files.
635
+ init-import=no
636
+
637
+ # List of qualified module names which can have objects that can redefine
638
+ # builtins.
639
+ redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
docs/.well-known/ai-plugin.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema_version": "v1",
3
+ "name_for_model": "text processing tools",
4
+ "name_for_human": "MetaGPT Text Plugin",
5
+ "description_for_model": "Plugins for text processing, including text-to-speech, text-to-image, text-to-embedding, text summarization, text-to-code, vector similarity calculation, web content crawling, and more.",
6
+ "description_for_human": "Plugins for text processing, including text-to-speech, text-to-image, text-to-embedding, text summarization, text-to-code, vector similarity calculation, web content crawling, and more.",
7
+ "auth": {
8
+ "type": "none"
9
+ },
10
+ "api": {
11
+ "type": "openapi",
12
+ "url": "https://github.com/iorisa/MetaGPT/blob/feature/assistant_role/.well-known/metagpt_oas3_api.yaml",
13
+ "has_user_authentication": false
14
+ },
15
+ "logo_url": "https://github.com/geekan/MetaGPT/blob/main/docs/resources/MetaGPT-logo.png",
16
+ "contact_email": "[email protected]",
17
+ "legal_info_url": "https://github.com/geekan/MetaGPT/blob/main/docs/README_CN.md"
18
+ }
docs/.well-known/metagpt_oas3_api.yaml ADDED
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ openapi: "3.0.0"
2
+
3
+ info:
4
+ title: "MetaGPT Export OpenAPIs"
5
+ version: "1.0"
6
+ servers:
7
+ - url: "/oas3"
8
+ variables:
9
+ port:
10
+ default: '8080'
11
+ description: HTTP service port
12
+
13
+ paths:
14
+ /tts/azsure:
15
+ x-prerequisite:
16
+ configurations:
17
+ azure_tts_subscription_key:
18
+ type: string
19
+ description: "For more details, check out: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts)"
20
+ azure_tts_region:
21
+ type: string
22
+ description: "For more details, check out: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts)"
23
+ required:
24
+ allOf:
25
+ - azure_tts_subscription_key
26
+ - azure_tts_region
27
+ post:
28
+ summary: "Convert Text to Base64-encoded .wav File Stream"
29
+ description: "For more details, check out: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts)"
30
+ operationId: azure_tts.oas3_azsure_tts
31
+ requestBody:
32
+ required: true
33
+ content:
34
+ application/json:
35
+ schema:
36
+ type: object
37
+ required:
38
+ - text
39
+ properties:
40
+ text:
41
+ type: string
42
+ description: Text to convert
43
+ lang:
44
+ type: string
45
+ description: The language code or locale, e.g., en-US (English - United States)
46
+ default: "zh-CN"
47
+ voice:
48
+ type: string
49
+ description: "Voice style, see: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts), [Voice Gallery](https://speech.microsoft.com/portal/voicegallery)"
50
+ default: "zh-CN-XiaomoNeural"
51
+ style:
52
+ type: string
53
+ description: "Speaking style to express different emotions. For more details, checkout: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts)"
54
+ default: "affectionate"
55
+ role:
56
+ type: string
57
+ description: "Role to specify age and gender. For more details, checkout: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts)"
58
+ default: "Girl"
59
+ subscription_key:
60
+ type: string
61
+ description: "Key used to access Azure AI service API, see: [Azure Portal](https://portal.azure.com/) > `Resource Management` > `Keys and Endpoint`"
62
+ default: ""
63
+ region:
64
+ type: string
65
+ description: "Location (or region) of your resource, see: [Azure Portal](https://portal.azure.com/) > `Resource Management` > `Keys and Endpoint`"
66
+ default: ""
67
+ responses:
68
+ '200':
69
+ description: "Base64-encoded .wav file data if successful, otherwise an empty string."
70
+ content:
71
+ application/json:
72
+ schema:
73
+ type: object
74
+ properties:
75
+ wav_data:
76
+ type: string
77
+ format: base64
78
+ '400':
79
+ description: "Bad Request"
80
+ '500':
81
+ description: "Internal Server Error"
82
+
83
+ /tts/iflytek:
84
+ x-prerequisite:
85
+ configurations:
86
+ IFLYTEK_APP_ID:
87
+ type: string
88
+ description: "Application ID is used to access your iFlyTek service API, see: `https://console.xfyun.cn/services/tts`"
89
+ IFLYTEK_API_KEY:
90
+ type: string
91
+ description: "WebAPI argument, see: `https://console.xfyun.cn/services/tts`"
92
+ IFLYTEK_API_SECRET:
93
+ type: string
94
+ description: "WebAPI argument, see: `https://console.xfyun.cn/services/tts`"
95
+ required:
96
+ allOf:
97
+ - iflytek_app_id
98
+ - iflytek_api_key
99
+ - iflytek_api_secret
100
+ post:
101
+ summary: "Convert Text to Base64-encoded .mp3 File Stream"
102
+ description: "For more details, check out: [iFlyTek](https://console.xfyun.cn/services/tts)"
103
+ operationId: iflytek_tts.oas3_iflytek_tts
104
+ requestBody:
105
+ required: true
106
+ content:
107
+ application/json:
108
+ schema:
109
+ type: object
110
+ required:
111
+ - text
112
+ properties:
113
+ text:
114
+ type: string
115
+ description: Text to convert
116
+ voice:
117
+ type: string
118
+ description: "Voice style, see: [iFlyTek Text-to_Speech](https://www.xfyun.cn/doc/tts/online_tts/API.html#%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E6%B5%81%E7%A8%8B)"
119
+ default: "xiaoyan"
120
+ app_id:
121
+ type: string
122
+ description: "Application ID is used to access your iFlyTek service API, see: `https://console.xfyun.cn/services/tts`"
123
+ default: ""
124
+ api_key:
125
+ type: string
126
+ description: "WebAPI argument, see: `https://console.xfyun.cn/services/tts`"
127
+ default: ""
128
+ api_secret:
129
+ type: string
130
+ description: "WebAPI argument, see: `https://console.xfyun.cn/services/tts`"
131
+ default: ""
132
+ responses:
133
+ '200':
134
+ description: "Base64-encoded .mp3 file data if successful, otherwise an empty string."
135
+ content:
136
+ application/json:
137
+ schema:
138
+ type: object
139
+ properties:
140
+ wav_data:
141
+ type: string
142
+ format: base64
143
+ '400':
144
+ description: "Bad Request"
145
+ '500':
146
+ description: "Internal Server Error"
147
+
148
+
149
+ /txt2img/openai:
150
+ x-prerequisite:
151
+ configurations:
152
+ OPENAI_API_KEY:
153
+ type: string
154
+ description: "OpenAI API key, For more details, checkout: `https://platform.openai.com/account/api-keys`"
155
+ required:
156
+ allOf:
157
+ - OPENAI_API_KEY
158
+ post:
159
+ summary: "Convert Text to Base64-encoded Image Data Stream"
160
+ operationId: openai_text_to_image.oas3_openai_text_to_image
161
+ requestBody:
162
+ required: true
163
+ content:
164
+ application/json:
165
+ schema:
166
+ type: object
167
+ properties:
168
+ text:
169
+ type: string
170
+ description: "The text used for image conversion."
171
+ size_type:
172
+ type: string
173
+ enum: ["256x256", "512x512", "1024x1024"]
174
+ default: "1024x1024"
175
+ description: "Size of the generated image."
176
+ openai_api_key:
177
+ type: string
178
+ default: ""
179
+ description: "OpenAI API key, For more details, checkout: `https://platform.openai.com/account/api-keys`"
180
+ responses:
181
+ '200':
182
+ description: "Base64-encoded image data."
183
+ content:
184
+ application/json:
185
+ schema:
186
+ type: object
187
+ properties:
188
+ image_data:
189
+ type: string
190
+ format: base64
191
+ '400':
192
+ description: "Bad Request"
193
+ '500':
194
+ description: "Internal Server Error"
195
+ /txt2embedding/openai:
196
+ x-prerequisite:
197
+ configurations:
198
+ OPENAI_API_KEY:
199
+ type: string
200
+ description: "OpenAI API key, For more details, checkout: `https://platform.openai.com/account/api-keys`"
201
+ required:
202
+ allOf:
203
+ - OPENAI_API_KEY
204
+ post:
205
+ summary: Text to embedding
206
+ operationId: openai_text_to_embedding.oas3_openai_text_to_embedding
207
+ description: Retrieve an embedding for the provided text using the OpenAI API.
208
+ requestBody:
209
+ content:
210
+ application/json:
211
+ schema:
212
+ type: object
213
+ properties:
214
+ input:
215
+ type: string
216
+ description: The text used for embedding.
217
+ model:
218
+ type: string
219
+ description: "ID of the model to use. For more details, checkout: [models](https://api.openai.com/v1/models)"
220
+ enum:
221
+ - text-embedding-ada-002
222
+ responses:
223
+ "200":
224
+ description: Successful response
225
+ content:
226
+ application/json:
227
+ schema:
228
+ $ref: "#/components/schemas/ResultEmbedding"
229
+ "4XX":
230
+ description: Client error
231
+ content:
232
+ application/json:
233
+ schema:
234
+ $ref: "#/components/schemas/Error"
235
+ "5XX":
236
+ description: Server error
237
+ content:
238
+ application/json:
239
+ schema:
240
+ $ref: "#/components/schemas/Error"
241
+
242
+ /txt2image/metagpt:
243
+ x-prerequisite:
244
+ configurations:
245
+ metagpt_tti_url:
246
+ type: string
247
+ description: "Model url."
248
+ required:
249
+ allOf:
250
+ - metagpt_tti_url
251
+ post:
252
+ summary: "Text to Image"
253
+ description: "Generate an image from the provided text using the MetaGPT Text-to-Image API."
254
+ operationId: metagpt_text_to_image.oas3_metagpt_text_to_image
255
+ requestBody:
256
+ required: true
257
+ content:
258
+ application/json:
259
+ schema:
260
+ type: object
261
+ required:
262
+ - text
263
+ properties:
264
+ text:
265
+ type: string
266
+ description: "The text used for image conversion."
267
+ size_type:
268
+ type: string
269
+ enum: ["512x512", "512x768"]
270
+ default: "512x512"
271
+ description: "Size of the generated image."
272
+ model_url:
273
+ type: string
274
+ description: "Model reset API URL for text-to-image."
275
+ default: ""
276
+ responses:
277
+ '200':
278
+ description: "Base64-encoded image data."
279
+ content:
280
+ application/json:
281
+ schema:
282
+ type: object
283
+ properties:
284
+ image_data:
285
+ type: string
286
+ format: base64
287
+ '400':
288
+ description: "Bad Request"
289
+ '500':
290
+ description: "Internal Server Error"
291
+
292
+ components:
293
+ schemas:
294
+ Embedding:
295
+ type: object
296
+ description: Represents an embedding vector returned by the embedding endpoint.
297
+ properties:
298
+ object:
299
+ type: string
300
+ example: embedding
301
+ embedding:
302
+ type: array
303
+ items:
304
+ type: number
305
+ example: [0.0023064255, -0.009327292, ...]
306
+ index:
307
+ type: integer
308
+ example: 0
309
+ Usage:
310
+ type: object
311
+ properties:
312
+ prompt_tokens:
313
+ type: integer
314
+ example: 8
315
+ total_tokens:
316
+ type: integer
317
+ example: 8
318
+ ResultEmbedding:
319
+ type: object
320
+ properties:
321
+ object:
322
+ type: string
323
+ example: result_embedding
324
+ data:
325
+ type: array
326
+ items:
327
+ $ref: "#/components/schemas/Embedding"
328
+ model:
329
+ type: string
330
+ example: text-embedding-ada-002
331
+ usage:
332
+ $ref: "#/components/schemas/Usage"
333
+ Error:
334
+ type: object
335
+ properties:
336
+ error:
337
+ type: string
338
+ example: An error occurred
docs/.well-known/openapi.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ openapi: "3.0.0"
2
+
3
+ info:
4
+ title: Hello World
5
+ version: "1.0"
6
+ servers:
7
+ - url: /openapi
8
+
9
+ paths:
10
+ /greeting/{name}:
11
+ post:
12
+ summary: Generate greeting
13
+ description: Generates a greeting message.
14
+ operationId: openapi_v3_hello.post_greeting
15
+ responses:
16
+ 200:
17
+ description: greeting response
18
+ content:
19
+ text/plain:
20
+ schema:
21
+ type: string
22
+ example: "hello dave!"
23
+ parameters:
24
+ - name: name
25
+ in: path
26
+ description: Name of the person to greet.
27
+ required: true
28
+ schema:
29
+ type: string
30
+ example: "dave"
31
+ requestBody:
32
+ content:
33
+ application/json:
34
+ schema:
35
+ type: object
docs/.well-known/skills.yaml ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ skillapi: "0.1.0"
2
+
3
+ info:
4
+ title: "Agent Skill Specification"
5
+ version: "1.0"
6
+
7
+ entities:
8
+ Assistant:
9
+ summary: assistant
10
+ description: assistant
11
+ skills:
12
+ - name: text_to_speech
13
+ description: Generate a voice file from the input text, text-to-speech
14
+ id: text_to_speech.text_to_speech
15
+ x-prerequisite:
16
+ configurations:
17
+ azure_tts_subscription_key:
18
+ type: string
19
+ description: "For more details, check out: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts)"
20
+ azure_tts_region:
21
+ type: string
22
+ description: "For more details, check out: [Azure Text-to_Speech](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts)"
23
+ IFLYTEK_APP_ID:
24
+ type: string
25
+ description: "Application ID is used to access your iFlyTek service API, see: `https://console.xfyun.cn/services/tts`"
26
+ IFLYTEK_API_KEY:
27
+ type: string
28
+ description: "WebAPI argument, see: `https://console.xfyun.cn/services/tts`"
29
+ IFLYTEK_API_SECRET:
30
+ type: string
31
+ description: "WebAPI argument, see: `https://console.xfyun.cn/services/tts`"
32
+ required:
33
+ oneOf:
34
+ - allOf:
35
+ - azure_tts_subscription_key
36
+ - azure_tts_region
37
+ - allOf:
38
+ - iflytek_app_id
39
+ - iflytek_api_key
40
+ - iflytek_api_secret
41
+ parameters:
42
+ text:
43
+ description: 'The text used for voice conversion.'
44
+ required: true
45
+ type: string
46
+ lang:
47
+ description: 'The value can contain a language code such as en (English), or a locale such as en-US (English - United States).'
48
+ type: string
49
+ enum:
50
+ - English
51
+ - Chinese
52
+ default: Chinese
53
+ voice:
54
+ description: Name of voice styles
55
+ type: string
56
+ default: zh-CN-XiaomoNeural
57
+ style:
58
+ type: string
59
+ description: Speaking style to express different emotions like cheerfulness, empathy, and calm.
60
+ enum:
61
+ - affectionate
62
+ - angry
63
+ - calm
64
+ - cheerful
65
+ - depressed
66
+ - disgruntled
67
+ - embarrassed
68
+ - envious
69
+ - fearful
70
+ - gentle
71
+ - sad
72
+ - serious
73
+ default: affectionate
74
+ role:
75
+ type: string
76
+ description: With roles, the same voice can act as a different age and gender.
77
+ enum:
78
+ - Girl
79
+ - Boy
80
+ - OlderAdultFemale
81
+ - OlderAdultMale
82
+ - SeniorFemale
83
+ - SeniorMale
84
+ - YoungAdultFemale
85
+ - YoungAdultMale
86
+ default: Girl
87
+ examples:
88
+ - ask: 'A girl says "hello world"'
89
+ answer: 'text_to_speech(text="hello world", role="Girl")'
90
+ - ask: 'A boy affectionate says "hello world"'
91
+ answer: 'text_to_speech(text="hello world", role="Boy", style="affectionate")'
92
+ - ask: 'A boy says "你好"'
93
+ answer: 'text_to_speech(text="你好", role="Boy", lang="Chinese")'
94
+ returns:
95
+ type: string
96
+ format: base64
97
+
98
+ - name: text_to_image
99
+ description: Create a drawing based on the text.
100
+ id: text_to_image.text_to_image
101
+ x-prerequisite:
102
+ configurations:
103
+ OPENAI_API_KEY:
104
+ type: string
105
+ description: "OpenAI API key, For more details, checkout: `https://platform.openai.com/account/api-keys`"
106
+ metagpt_tti_url:
107
+ type: string
108
+ description: "Model url."
109
+ required:
110
+ oneOf:
111
+ - OPENAI_API_KEY
112
+ - metagpt_tti_url
113
+ parameters:
114
+ text:
115
+ description: 'The text used for image conversion.'
116
+ type: string
117
+ required: true
118
+ size_type:
119
+ description: size type
120
+ type: string
121
+ default: "512x512"
122
+ examples:
123
+ - ask: 'Draw a girl'
124
+ answer: 'text_to_image(text="Draw a girl", size_type="512x512")'
125
+ - ask: 'Draw an apple'
126
+ answer: 'text_to_image(text="Draw an apple", size_type="512x512")'
127
+ returns:
128
+ type: string
129
+ format: base64
130
+
131
+ - name: web_search
132
+ description: Perform Google searches to provide real-time information.
133
+ id: web_search.web_search
134
+ x-prerequisite:
135
+ configurations:
136
+ SEARCH_ENGINE:
137
+ type: string
138
+ description: "Supported values: serpapi/google/serper/ddg"
139
+ SERPER_API_KEY:
140
+ type: string
141
+ description: "SERPER API KEY, For more details, checkout: `https://serper.dev/api-key`"
142
+ required:
143
+ allOf:
144
+ - SEARCH_ENGINE
145
+ - SERPER_API_KEY
146
+ parameters:
147
+ query:
148
+ type: string
149
+ description: 'The search query.'
150
+ required: true
151
+ max_results:
152
+ type: number
153
+ default: 6
154
+ description: 'The number of search results to retrieve.'
155
+ examples:
156
+ - ask: 'Search for information about artificial intelligence'
157
+ answer: 'web_search(query="Search for information about artificial intelligence", max_results=6)'
158
+ - ask: 'Find news articles about climate change'
159
+ answer: 'web_search(query="Find news articles about climate change", max_results=6)'
160
+ returns:
161
+ type: string
docs/FAQ-EN.md ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Our vision is to [extend human life](https://github.com/geekan/HowToLiveLonger) and [reduce working hours](https://github.com/geekan/MetaGPT/).
2
+
3
+ ### Convenient Link for Sharing this Document:
4
+
5
+ ```
6
+ - MetaGPT-Index/FAQ-EN https://github.com/geekan/MetaGPT/blob/main/docs/FAQ-EN.md
7
+ - MetaGPT-Index/FAQ-CN https://deepwisdom.feishu.cn/wiki/MsGnwQBjiif9c3koSJNcYaoSnu4
8
+ ```
9
+
10
+ ### Link
11
+
12
+ 1. Code:https://github.com/geekan/MetaGPT
13
+ 2. Roadmap:https://github.com/geekan/MetaGPT/blob/main/docs/ROADMAP.md
14
+ 3. EN
15
+ 1. Demo Video: [MetaGPT: Multi-Agent AI Programming Framework](https://www.youtube.com/watch?v=8RNzxZBTW8M)
16
+ 2. Tutorial: [MetaGPT: Deploy POWERFUL Autonomous Ai Agents BETTER Than SUPERAGI!](https://www.youtube.com/watch?v=q16Gi9pTG_M&t=659s)
17
+ 3. Author's thoughts video(EN): [MetaGPT Matthew Berman](https://youtu.be/uT75J_KG_aY?si=EgbfQNAwD8F5Y1Ak)
18
+ 4. CN
19
+ 1. Demo Video: [MetaGPT:一行代码搭建你的虚拟公司_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1NP411C7GW/?spm_id_from=333.999.0.0&vd_source=735773c218b47da1b4bd1b98a33c5c77)
20
+ 1. Tutorial: [一个提示词写游戏 Flappy bird, 比AutoGPT强10倍的MetaGPT,最接近AGI的AI项目](https://youtu.be/Bp95b8yIH5c)
21
+ 2. Author's thoughts video(CN): [MetaGPT作者深度解析直播回放_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1Ru411V7XL/?spm_id_from=333.337.search-card.all.click)
22
+
23
+ ### How to become a contributor?
24
+
25
+ 1. Choose a task from the Roadmap (or you can propose one). By submitting a PR, you can become a contributor and join the dev team.
26
+ 2. Current contributors come from backgrounds including ByteDance AI Lab/DingDong/Didi/Xiaohongshu, Tencent/Baidu/MSRA/TikTok/BloomGPT Infra/Bilibili/CUHK/HKUST/CMU/UCB
27
+
28
+ ### Chief Evangelist (Monthly Rotation)
29
+
30
+ MetaGPT Community - The position of Chief Evangelist rotates on a monthly basis. The primary responsibilities include:
31
+
32
+ 1. Maintaining community FAQ documents, announcements, and Github resources/READMEs.
33
+ 2. Responding to, answering, and distributing community questions within an average of 30 minutes, including on platforms like Github Issues, Discord and WeChat.
34
+ 3. Upholding a community atmosphere that is enthusiastic, genuine, and friendly.
35
+ 4. Encouraging everyone to become contributors and participate in projects that are closely related to achieving AGI (Artificial General Intelligence).
36
+ 5. (Optional) Organizing small-scale events, such as hackathons.
37
+
38
+ ### FAQ
39
+
40
+ 1. Code truncation/ Parsing failure:
41
+ 1. Check if it's due to exceeding length. Consider using the gpt-4-turbo or other long token versions.
42
+ 2. Success rate:
43
+ 1. There hasn't been a quantitative analysis yet, but the success rate of code generated by gpt-4-turbo is significantly higher than that of gpt-3.5-turbo.
44
+ 3. Support for incremental, differential updates (if you wish to continue a half-done task):
45
+ 1. There is now an experimental version. Specify `--inc --project-path "<path>"` or `--inc --project-name "<name>"` on the command line and enter the corresponding requirements to try it.
46
+ 4. Can existing code be loaded?
47
+ 1. We are doing this, but it is very difficult, especially when the project is large, it is very difficult to achieve a high success rate.
48
+ 5. Support for multiple programming languages and natural languages?
49
+ 1. It is now supported, but it is still in experimental version
50
+ 6. Want to join the contributor team? How to proceed?
51
+ 1. Merging a PR will get you into the contributor's team. The main ongoing tasks are all listed on the ROADMAP.
52
+ 7. PRD stuck / unable to access/ connection interrupted
53
+ 1. The official openai base_url address is `https://api.openai.com/v1`
54
+ 2. If the official openai base_url address is inaccessible in your environment (this can be verified with curl), it's recommended to configure using base_url to other "reverse-proxy" provider such as openai-forward. For instance, `openai base_url: "``https://api.openai-forward.com/v1``"`
55
+ 3. If the official openai base_url address is inaccessible in your environment (again, verifiable via curl), another option is to configure the llm.proxy in the `config2.yaml`. This way, you can access the official openai base_url via a local proxy. If you don't need to access via a proxy, please do not enable this configuration; if accessing through a proxy is required, modify it to the correct proxy address.
56
+ 4. Note: OpenAI's default API design ends with a v1. An example of the correct configuration is: `base_url: "https://api.openai.com/v1"
57
+ 8. Get reply: "Absolutely! How can I assist you today?"
58
+ 1. Did you use Chi or a similar service? These services are prone to errors, and it seems that the error rate is higher when consuming 3.5k-4k tokens in GPT-4
59
+ 9. What does Max token mean?
60
+ 1. It's a configuration for OpenAI's maximum response length. If the response exceeds the max token, it will be truncated.
61
+ 10. How to change the investment amount?
62
+ 1. You can view all commands by typing `metagpt --help`
63
+ 11. Which version of Python is more stable?
64
+ 1. python3.9 / python3.10
65
+ 12. Can't use GPT-4, getting the error "The model gpt-4 does not exist."
66
+ 1. OpenAI's official requirement: You can use GPT-4 only after spending $1 on OpenAI.
67
+ 1. Tip: Run some data with gpt-3.5-turbo (consume the free quota and $1), and then you should be able to use gpt-4.
68
+ 13. Can games whose code has never been seen before be written?
69
+ 1. Refer to the README. The recommendation system of Toutiao is one of the most complex systems in the world currently. Although it's not on GitHub, many discussions about it exist online. If it can visualize these, it suggests it can also summarize these discussions and convert them into code. The prompt would be something like "write a recommendation system similar to Toutiao". Note: this was approached in earlier versions of the software. The SOP of those versions was different; the current one adopts Elon Musk's five-step work method, emphasizing trimming down requirements as much as possible.
70
+ 14. Under what circumstances would there typically be errors?
71
+ 1. More than 500 lines of code: some function implementations may be left blank.
72
+ 2. When using a database, it often gets the implementation wrong — since the SQL database initialization process is usually not in the code.
73
+ 3. With more lines of code, there's a higher chance of false impressions, leading to calls to non-existent APIs.
74
+ 15. An error occurred during installation: "Another program is using this file...egg".
75
+ 1. Delete the file and try again.
76
+ 2. Or manually execute`pip install -r requirements.txt`
77
+ 16. The origin of the name MetaGPT?
78
+ 1. The name was derived after iterating with GPT-4 over a dozen rounds. GPT-4 scored and suggested it.
79
+ 17. openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details
80
+ 1. If you haven't exhausted your free quota, set RPM to 3 or lower in the settings.
81
+ 2. If your free quota is used up, consider adding funds to your account.
82
+ 18. What does "borg" mean in n_borg?
83
+ 1. [Wikipedia borg meaning ](https://en.wikipedia.org/wiki/Borg)
84
+ 2. The Borg civilization operates based on a hive or collective mentality, known as "the Collective." Every Borg individual is connected to the collective via a sophisticated subspace network, ensuring continuous oversight and guidance for every member. This collective consciousness allows them to not only "share the same thoughts" but also to adapt swiftly to new strategies. While individual members of the collective rarely communicate, the collective "voice" sometimes transmits aboard ships.
85
+ 19. How to use the Claude API?
86
+ 1. The full implementation of the Claude API is not provided in the current code.
87
+ 1. You can use the Claude API through third-party API conversion projects like: https://github.com/jtsang4/claude-to-chatgpt
88
+ 20. Is Llama2 supported?
89
+ 1. On the day Llama2 was released, some of the community members began experiments and found that output can be generated based on MetaGPT's structure. However, Llama2's context is too short to generate a complete project. Before regularly using Llama2, it's necessary to expand the context window to at least 8k. If anyone has good recommendations for expansion models or methods, please leave a comment.
90
+ 21. `mermaid-cli getElementsByTagName SyntaxError: Unexpected token '.'`
91
+ 1. Upgrade node to version 14.x or above:
92
+ 1. `npm install -g n`
93
+ 2. `n stable` to install the stable version of node(v18.x)
docs/README_CN.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MetaGPT: 多智能体框架
2
+
3
+ <p align="center">
4
+ <a href=""><img src="resources/MetaGPT-new-log.png" alt="MetaGPT logo: 使 GPT 以软件公司的形式工作,协作处理更复杂的任务" width="150px"></a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <b>使 GPTs 组成软件公司,协作处理更复杂的任务</b>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="README_CN.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
13
+ <a href="../README.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
14
+ <a href="README_FR.md"><img src="https://img.shields.io/badge/document-French-blue.svg" alt="FR doc"></a>
15
+ <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-blue.svg" alt="JA doc"></a>
16
+ <a href="https://discord.gg/DYn29wFk9z"><img src="https://dcbadge.vercel.app/api/server/DYn29wFk9z?style=flat" alt="Discord Follow"></a>
17
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
18
+ <a href="ROADMAP.md"><img src="https://img.shields.io/badge/ROADMAP-路线图-blue" alt="roadmap"></a>
19
+ <a href="https://twitter.com/MetaGPT_"><img src="https://img.shields.io/twitter/follow/MetaGPT?style=social" alt="Twitter Follow"></a>
20
+ </p>
21
+
22
+ <p align="center">
23
+ <a href="https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/geekan/MetaGPT"><img src="https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode" alt="Open in Dev Containers"></a>
24
+ <a href="https://codespaces.new/geekan/MetaGPT"><img src="https://img.shields.io/badge/Github_Codespace-Open-blue?logo=github" alt="Open in GitHub Codespaces"></a>
25
+ <a href="https://huggingface.co/spaces/deepwisdom/MetaGPT-SoftwareCompany" target="_blank"><img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20-Hugging%20Face-blue?color=blue&logoColor=white" /></a>
26
+ </p>
27
+
28
+ 1. MetaGPT输入**一句话的老板需求**,输出**用户故事 / 竞品分析 / 需求 / 数据结构 / APIs / 文件等**
29
+ 2. MetaGPT内部包括**产品经理 / 架构师 / 项目经理 / 工程师**,它提供了一个**软件公司**的全过程与精心调配的SOP
30
+ 1. `Code = SOP(Team)` 是核心哲学。我们将SOP具象化,并且用于LLM构成的团队
31
+
32
+ ![一个完全由大语言模型角色构成的软件公司](resources/software_company_cd.jpeg)
33
+
34
+ <p align="center">软件公司多角色示意图(正在逐步实现)</p>
35
+
36
+ ## 安装
37
+ ### Pip安装
38
+
39
+ > 确保您的系统已安装 Python 3.9 或更高版本。您可以使用以下命令来检查:`python --version`。
40
+ > 您可以这样使用 conda:`conda create -n metagpt python=3.9 && conda activate metagpt`
41
+
42
+ ```bash
43
+ pip install metagpt
44
+ metagpt --init-config # 创建 ~/.metagpt/config2.yaml,根据您的需求修改它
45
+ metagpt "创建一个 2048 游戏" # 这将在 ./workspace 创建一个仓库
46
+ ```
47
+
48
+ 或者您可以将其作为库使用
49
+
50
+ ```python
51
+ from metagpt.software_company import generate_repo, ProjectRepo
52
+ repo: ProjectRepo = generate_repo("创建一个 2048 游戏") # 或 ProjectRepo("<路径>")
53
+ print(repo) # 它将打印出仓库结构及其文件
54
+ ```
55
+
56
+ 详细的安装请参考 [cli_install](https://docs.deepwisdom.ai/guide/get_started/installation.html#install-stable-version)
57
+
58
+ ### Docker安装
59
+ > 注意:在Windows中,你需要将 "/opt/metagpt" 替换为Docker具有创建权限的目录,比如"D:\Users\x\metagpt"
60
+
61
+ ```bash
62
+ # 步骤1: 下载metagpt官方镜像并准备好config2.yaml
63
+ docker pull metagpt/metagpt:latest
64
+ mkdir -p /opt/metagpt/{config,workspace}
65
+ docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config2.yaml > /opt/metagpt/config/config2.yaml
66
+ vim /opt/metagpt/config/config2.yaml # 修改配置文件
67
+
68
+ # 步骤2: 使用容器运行metagpt演示
69
+ docker run --rm \
70
+ --privileged \
71
+ -v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
72
+ -v /opt/metagpt/workspace:/app/metagpt/workspace \
73
+ metagpt/metagpt:latest \
74
+ metagpt "Write a cli snake game"
75
+ ```
76
+
77
+ 详细的安装请参考 [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)
78
+
79
+ ### 快速开始的演示视频
80
+ - 在 [MetaGPT Huggingface Space](https://huggingface.co/spaces/deepwisdom/MetaGPT-SoftwareCompany) 上进行体验
81
+ - [Matthew Berman: How To Install MetaGPT - Build A Startup With One Prompt!!](https://youtu.be/uT75J_KG_aY)
82
+ - [官方演示视频](https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d)
83
+
84
+ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace413419
85
+
86
+ ## 教程
87
+ - 🗒 [在线文档](https://docs.deepwisdom.ai/main/zh/)
88
+ - 💻 [如何使用](https://docs.deepwisdom.ai/main/zh/guide/get_started/quickstart.html)
89
+ - 🔎 [MetaGPT的能力及应用场景](https://docs.deepwisdom.ai/main/zh/guide/get_started/introduction.html)
90
+ - 🛠 如��构建你自己的智能体?
91
+ - [MetaGPT的使用和开发教程 | 智能体入门](https://docs.deepwisdom.ai/main/zh/guide/tutorials/agent_101.html)
92
+ - [MetaGPT的使用和开发教程 | 多智能体入门](https://docs.deepwisdom.ai/main/zh/guide/tutorials/multi_agent_101.html)
93
+ - 🧑‍💻 贡献
94
+ - [开发路线图](ROADMAP.md)
95
+ - 🔖 示例
96
+ - [辩论](https://docs.deepwisdom.ai/main/zh/guide/use_cases/multi_agent/debate.html)
97
+ - [调研员](https://docs.deepwisdom.ai/main/zh/guide/use_cases/agent/researcher.html)
98
+ - [票据助手](https://docs.deepwisdom.ai/main/zh/guide/use_cases/agent/receipt_assistant.html)
99
+ - ❓ [常见问题解答](https://docs.deepwisdom.ai/main/zh/guide/faq.html)
100
+
101
+ ## 支持
102
+
103
+ ### 加入我们
104
+
105
+ 📢 加入我们的[Discord频道](https://discord.gg/ZRHeExS6xv)!
106
+
107
+ 期待在那里与您相见!🎉
108
+
109
+ ### 联系信息
110
+
111
+ 如果您对这个项目有任何问题或反馈,欢迎联系我们。我们非常欢迎您的建议!
112
+
113
+ - **邮箱:** [email protected]
114
+ - **GitHub 问题:** 对于更技术性的问题,您也可以在我们的 [GitHub 仓库](https://github.com/geekan/metagpt/issues) 中创建一个新的问题。
115
+
116
+ 我们会在2-3个工作日内回复所有问题。
117
+
118
+ ## 引用
119
+
120
+ 如果您在研究论文中使用 MetaGPT 或 Data Interpreter,请引用我们的工作:
121
+
122
+ ```bibtex
123
+ @inproceedings{hong2024metagpt,
124
+ title={Meta{GPT}: Meta Programming for A Multi-Agent Collaborative Framework},
125
+ author={Sirui Hong and Mingchen Zhuge and Jonathan Chen and Xiawu Zheng and Yuheng Cheng and Jinlin Wang and Ceyao Zhang and Zili Wang and Steven Ka Shing Yau and Zijuan Lin and Liyang Zhou and Chenyu Ran and Lingfeng Xiao and Chenglin Wu and J{\"u}rgen Schmidhuber},
126
+ booktitle={The Twelfth International Conference on Learning Representations},
127
+ year={2024},
128
+ url={https://openreview.net/forum?id=VtmBAGCN7o}
129
+ }
130
+ @misc{hong2024data,
131
+ title={Data Interpreter: An LLM Agent For Data Science},
132
+ author={Sirui Hong and Yizhang Lin and Bang Liu and Bangbang Liu and Binhao Wu and Danyang Li and Jiaqi Chen and Jiayi Zhang and Jinlin Wang and Li Zhang and Lingyao Zhang and Min Yang and Mingchen Zhuge and Taicheng Guo and Tuo Zhou and Wei Tao and Wenyi Wang and Xiangru Tang and Xiangtao Lu and Xiawu Zheng and Xinbing Liang and Yaying Fei and Yuheng Cheng and Zongze Xu and Chenglin Wu},
133
+ year={2024},
134
+ eprint={2402.18679},
135
+ archivePrefix={arXiv},
136
+ primaryClass={cs.AI}
137
+ }
138
+ ```
docs/README_FR.md ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # MetaGPT: Architecture Multi-Agent
3
+
4
+ <p align="center">
5
+ <a href=""><img src="resources/MetaGPT-new-log.png" alt="Logo de MetaGPT : Permettre à GPT de travailler dans une entreprise de logiciels, en collaborant pour relever des tâches plus complexes." width="150px"></a>
6
+ </p>
7
+
8
+ <p align="center">
9
+ <b>Assigner différents rôles aux GPTs pour former une entité collaborative capable de gérer des tâches complexes.</b>
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="README_CN.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
14
+ <a href="../README.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
15
+ <a href="README_FR.md"><img src="https://img.shields.io/badge/document-French-blue.svg" alt="FR doc"></a>
16
+ <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-blue.svg" alt="JA doc"></a>
17
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
18
+ <a href="ROADMAP.md"><img src="https://img.shields.io/badge/ROADMAP-路线图-blue" alt="roadmap"></a>
19
+ <a href="https://discord.gg/DYn29wFk9z"><img src="https://dcbadge.vercel.app/api/server/DYn29wFk9z?style=flat" alt="Suivre le Discord"></a>
20
+ <a href="https://twitter.com/MetaGPT_"><img src="https://img.shields.io/twitter/follow/MetaGPT?style=social" alt="Suivre sur Twitter"></a>
21
+ </p>
22
+
23
+ <p align="center">
24
+ <a href="https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/geekan/MetaGPT"><img src="https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode" alt="Ouvrir dans Dev Containers"></a>
25
+ <a href="https://codespaces.new/geekan/MetaGPT"><img src="https://img.shields.io/badge/Github_Codespace-Open-blue?logo=github" alt="Ouvir dans GitHub Codespaces"></a>
26
+ <a href="https://huggingface.co/spaces/deepwisdom/MetaGPT" target="_blank"><img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20-Hugging%20Face-blue?color=blue&logoColor=white" /></a>
27
+ </p>
28
+
29
+ ## Nouveautés
30
+ 🚀 29 mars 2024: La version [v0.8.0](https://github.com/geekan/MetaGPT/releases/tag/v0.8.0) a été publiée. Vous pouvez désormais utiliser le Data Interpreter ([arxiv](https://arxiv.org/abs/2402.18679), [example](https://docs.deepwisdom.ai/main/en/DataInterpreter/), [code](https://github.com/geekan/MetaGPT/tree/main/examples/di)) via l'importation du package PyPI. De plus, le module RAG (Génération Augmentée par Récupération) a été intégré, et plusieurs nouveaux modèles de LLMs sont désormais pris en charge.
31
+
32
+ 🚀 28 février 2024: La version [v0.7.0](https://github.com/geekan/MetaGPT/releases/tag/v0.7.0) a été publiée, permettant l'attribution de différents modèles de langage (LLMs) à différents Rôles. Nous avons également introduit le [Data Interpreter](https://github.com/geekan/MetaGPT/blob/main/examples/di/README.md), , un agent puissant capable de résoudre une grande variété de problèmes du monde réel.
33
+
34
+ 🚀 16 janvier 2024: Notre article intitulé [MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
35
+ ](https://openreview.net/forum?id=VtmBAGCN7o) a été accepté pour une **présentation orale (top 1,2%)** à la conférence ICLR 2024, se **classant n°1** dans la catégorie des agents basés sur les modèles de langage (LLM).
36
+
37
+ 🚀 3 janvier 2024 : La version [v0.6.0](https://github.com/geekan/MetaGPT/releases/tag/v0.6.0) a été publiée avec de nouvelles fonctionnalités, notamment la sérialisation, la mise à niveau du package OpenAI et la prise en charge de plusieurs modèles de langage (LLM). Un [exemple minimal pour le débat](https://github.com/geekan/MetaGPT/blob/main/examples/debate_simple.py) a également été ajouté pour illustrer ces capacités.
38
+
39
+ 🚀 15 décembre 2023 : La version [v0.5.0](https://github.com/geekan/MetaGPT/releases/tag/v0.5.0) a été publiée, introduisant des fonctionnalités expérimentales telles que le développement incrémental, la prise en charge du multilingue, et la compatibilité avec plusieurs langages de programmation, etc..
40
+
41
+
42
+ 🔥 8 novembre 2023 : MetaGPT a été sélectionné parmi les [Open100: Top 100 des réalisations open source](https://www.benchcouncil.org/evaluation/opencs/annual.html), une reconnaissance qui met en avant les meilleures innovations et contributions dans le domaine des projets open source.
43
+
44
+ 🔥 1er septembre 2023 : MetaGPT a dominé le classement **GitHub Trending Monthly** pour la **17ème fois** en août 2023, consolidant ainsi sa position en tant que projet open source de premier plan.
45
+
46
+ 🌟 30 juin 2023 : MetaGPT est désormais open source, permettant à la communauté de contribuer et d'enrichir le projet.
47
+
48
+ 🌟 24 avril 2023 : La première ligne de code de MetaGPT a été engagée, marquant le début de ce projet innovant.
49
+
50
+
51
+ ### Système multi-agents dans une entreprise de logiciels
52
+
53
+ 1. **Exigence unique** : MetaGPT prend en entrée une **exigence formulée en une ligne** et produit des résultats variés, tels que des **user stories, des analyses concurrentielles, des exigences, des structures de données, des API, des documents, etc.**.
54
+
55
+ 2. **Structure interne** : MetaGPT intègre divers rôles présents dans une entreprise de logiciels, notamment **des chefs de produits, des architectes, des chefs de projet et des ingénieurs**. Ce système propose un processus complet de **développement logiciel**, soutenu par des **procédures opérationnelles standardisées (SOP) soigneusement orchestrées**.
56
+
57
+ 1. La philosophie centrale du système est exprimée par l'énoncé : `Code = SOP(Équipe)`. Cela signifie que les SOP sont concrétisées et appliquées à des équipes composées de modèles de langage (LLMs), permettant ainsi une meilleure gestion et un meilleur déroulement des projets.
58
+
59
+
60
+ ![Une entreprise de logiciels se compose de rôles basés sur des LLM](resources/software_company_cd.jpeg)
61
+
62
+ <p align="center">Schéma multi-agent d'une entreprise de logiciels (Mise en œuvre progressive)</p>
63
+
64
+
65
+ ## Commençons !
66
+
67
+ ### Installation
68
+
69
+ > Assurez-vous que Python 3.9 ou supérieur, mais inférieur à 3.12, est installé sur votre système. Vous pouvez le vérifier en utilisant : `python --version`.
70
+ > Vous pouvez utiliser conda comme suit : `conda create -n metagpt python=3.9 && conda activate metagpt`
71
+
72
+ ```bash
73
+ pip install --upgrade metagpt
74
+ # or `pip install --upgrade git+https://github.com/geekan/MetaGPT.git`
75
+ # or `git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .`
76
+ ```
77
+
78
+ Pour des conseils d'installation détaillés, veuillez vous référer à [cli_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-stable-version)
79
+ ou [docker_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-with-docker)
80
+
81
+ ### Configuration
82
+
83
+ Vous pouvez initialiser la configuration de MetaGPT en lançant la commande suivante, ou en créant manuellement le fichier `~/.metagpt/config2.yaml` :
84
+ ```bash
85
+ # Visitez https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html pour plus de détails
86
+ metagpt --init-config # il créera ~/.metagpt/config2.yaml, il suffit de le modifier selon vos besoins
87
+ ```
88
+
89
+ Vous pouvez configurer `~/.metagpt/config2.yaml` selon l'[exemple](https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml) et le [doc](https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html) :
90
+
91
+ ```yaml
92
+ llm:
93
+ api_type: "openai" # ou azure / ollama / groq etc. Consultez LLMType pour plus d'options
94
+ model: "gpt-4-turbo" # ou gpt-3.5-turbo
95
+ base_url: "https://api.openai.com/v1" # ou URL de transfert / URL d'autre LLM.
96
+ api_key: "VOTRE_CLE_API"
97
+ ```
98
+
99
+ ### Utilisation
100
+
101
+ Après l'installation, vous pouvez utiliser MetaGPT en CLI
102
+
103
+ ```bash
104
+ metagpt "Create a 2048 game" # ceci créera un repo dans ./workspace
105
+ ```
106
+
107
+ ou l'utiliser comme bibliothèque
108
+
109
+ ```python
110
+ from metagpt.software_company import generate_repo, ProjectRepo
111
+ repo: ProjectRepo = generate_repo("Create a 2048 game") # ou ProjectRepo("<path>")
112
+ print(repo) # il affichera la structure du repo avec les fichiers
113
+ ```
114
+
115
+ Vous pouvez aussi utiliser [Data Interpreter](https://github.com/geekan/MetaGPT/tree/main/examples/di) pour écrire du code:
116
+
117
+ ```python
118
+ import asyncio
119
+ from metagpt.roles.di.data_interpreter import DataInterpreter
120
+
121
+ async def main():
122
+ di = DataInterpreter()
123
+ await di.run("Exécuter une analyse de données sur le jeu de données sklearn Iris et y inclure un graphique")
124
+
125
+ asyncio.run(main()) # ou attendre main() dans une configuration de notebook jupyter
126
+ ```
127
+
128
+
129
+ ### Vidéo de démonstration et de démarrage rapide (en Anglais) :
130
+ - Essayez-le sur [MetaGPT Huggingface Space](https://huggingface.co/spaces/deepwisdom/MetaGPT)
131
+ - [Matthew Berman : Comment installer MetaGPT - Construire une startup avec une seule invite](https://youtu.be/uT75J_KG_aY)
132
+ - [Vidéo de démonstration officielle](https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d)
133
+
134
+ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace413419
135
+
136
+ ## Tutoriel (en Anglais)
137
+
138
+ - 🗒 [Document en ligne](https://docs.deepwisdom.ai/main/en/)
139
+ - 💻 [Utilisation](https://docs.deepwisdom.ai/main/en/guide/get_started/quickstart.html)
140
+ - 🔎 [Que peut faire MetaGPT](https://docs.deepwisdom.ai/main/en/guide/get_started/introduction.html)
141
+ - 🛠 Comment créer ses propres agents ?
142
+ - [MetaGPT Guide d'utilisation et de développement | Agent 101](https://docs.deepwisdom.ai/main/en/guide/tutorials/agent_101.html)
143
+ - [MetaGPT Guide d'utilisation et de développement | MultiAgent 101](https://docs.deepwisdom.ai/main/en/guide/tutorials/multi_agent_101.html)
144
+ - 🧑‍💻 Contribution
145
+ - [Élaborer une feuille de route](docs/ROADMAP.md)
146
+ - 🔖 Cas d'usage
147
+ - [Interprète des données](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/interpreter/intro.html)
148
+ - [Débat](https://docs.deepwisdom.ai/main/en/guide/use_cases/multi_agent/debate.html)
149
+ - [Chercheur](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/researcher.html)
150
+ - [Assistant(e) de réception](https://docs.deepwisdom.ai/main/en/guide/use_cases/agent/receipt_assistant.html)
151
+ - ❓ [FAQs](https://docs.deepwisdom.ai/main/en/guide/faq.html)
152
+
153
+ ## Support
154
+
155
+ ### Rejoignez-nous sur Discord
156
+
157
+ 📢 Rejoignez-nous sur [Discord Channel](https://discord.gg/ZRHeExS6xv)! Au plaisir de vous y voir ! 🎉
158
+
159
+ ### Formulaire de contribution
160
+
161
+ 📝 [Remplissez le formulaire](https://airtable.com/appInfdG0eJ9J4NNL/pagK3Fh1sGclBvVkV/form) pour devenir contributeur. Nous nous réjouissons de votre participation !
162
+
163
+ ### Information de contact
164
+
165
+ Si vous avez des questions ou des commentaires sur ce projet, n'hésitez pas à nous contacter. Nous apprécions grandement vos suggestions !
166
+
167
+ - **Email:** [email protected]
168
+ - **GitHub Issues:** Pour des questions plus techniques, vous pouvez également créer un nouveau problème dans notre [dépôt Github](https://github.com/geekan/metagpt/issues).
169
+
170
+ Nous répondrons à toutes les questions dans un délai de 2 à 3 jours ouvrables.
171
+
172
+ ## Citation
173
+
174
+ Pour rester informé des dernières recherches et développements, suivez [@MetaGPT_] (https://twitter.com/MetaGPT_) sur Twitter.
175
+
176
+ Pour citer [MetaGPT](https://openreview.net/forum?id=VtmBAGCN7o) ou [Data Interpreter](https://arxiv.org/abs/2402.18679) dans des publications, veuillez utiliser les entrées BibTeX suivantes.
177
+
178
+ ```bibtex
179
+ @inproceedings{hong2024metagpt,
180
+ title={Meta{GPT}: Meta Programming for A Multi-Agent Collaborative Framework},
181
+ author={Sirui Hong and Mingchen Zhuge and Jonathan Chen and Xiawu Zheng and Yuheng Cheng and Jinlin Wang and Ceyao Zhang and Zili Wang and Steven Ka Shing Yau and Zijuan Lin and Liyang Zhou and Chenyu Ran and Lingfeng Xiao and Chenglin Wu and J{\"u}rgen Schmidhuber},
182
+ booktitle={The Twelfth International Conference on Learning Representations},
183
+ year={2024},
184
+ url={https://openreview.net/forum?id=VtmBAGCN7o}
185
+ }
186
+ @misc{hong2024data,
187
+ title={Data Interpreter: An LLM Agent For Data Science},
188
+ author={Sirui Hong and Yizhang Lin and Bang Liu and Bangbang Liu and Binhao Wu and Danyang Li and Jiaqi Chen and Jiayi Zhang and Jinlin Wang and Li Zhang and Lingyao Zhang and Min Yang and Mingchen Zhuge and Taicheng Guo and Tuo Zhou and Wei Tao and Wenyi Wang and Xiangru Tang and Xiangtao Lu and Xiawu Zheng and Xinbing Liang and Yaying Fei and Yuheng Cheng and Zongze Xu and Chenglin Wu},
189
+ year={2024},
190
+ eprint={2402.18679},
191
+ archivePrefix={arXiv},
192
+ primaryClass={cs.AI}
193
+ }
194
+ ```
docs/README_JA.md ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MetaGPT: マルチエージェントフレームワーク
2
+
3
+ <p align="center">
4
+ <a href=""><img src="resources/MetaGPT-new-log.png" alt="MetaGPT ロゴ: GPT がソフトウェア会社で働けるようにし、協力してより複雑な仕事に取り組む。" width="150px"></a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <b>GPT にさまざまな役割を割り当てることで、複雑なタスクのための共同ソフトウェアエンティティを形成します。</b>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="README_CN.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a>
13
+ <a href="../README.md"><img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN doc"></a>
14
+ <a href="README_FR.md"><img src="https://img.shields.io/badge/document-French-blue.svg" alt="FR doc"></a>
15
+ <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-blue.svg" alt="JA doc"></a>
16
+ <a href="https://discord.gg/wCp6Q3fsAk"><img src="https://img.shields.io/badge/Discord-Join-blue?logo=discord&logoColor=white&color=blue" alt="Discord Follow"></a>
17
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
18
+ <a href="docs/ROADMAP.md"><img src="https://img.shields.io/badge/ROADMAP-路线图-blue" alt="roadmap"></a>
19
+ <a href="https://twitter.com/MetaGPT_"><img src="https://img.shields.io/twitter/follow/MetaGPT?style=social" alt="Twitter Follow"></a>
20
+ </p>
21
+
22
+ <p align="center">
23
+ <a href="https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/geekan/MetaGPT"><img src="https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode" alt="Open in Dev Containers"></a>
24
+ <a href="https://codespaces.new/geekan/MetaGPT"><img src="https://img.shields.io/badge/Github_Codespace-Open-blue?logo=github" alt="Open in GitHub Codespaces"></a>
25
+ <a href="https://huggingface.co/spaces/deepwisdom/MetaGPT-SoftwareCompany" target="_blank"><img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20-Hugging%20Face-blue?color=blue&logoColor=white" /></a>
26
+ </p>
27
+
28
+ 1. MetaGPT は、**1 行の要件** を入力とし、**ユーザーストーリー / 競合分析 / 要件 / データ構造 / API / 文書など** を出力します。
29
+ 2. MetaGPT には、**プロダクト マネージャー、アーキテクト、プロジェクト マネージャー、エンジニア** が含まれています。MetaGPT は、**ソフトウェア会社のプロセス全体を、慎重に調整された SOP とともに提供します。**
30
+ 1. `Code = SOP(Team)` が基本理念です。私たちは SOP を具体化し、LLM で構成されるチームに適用します。
31
+
32
+ ![ソフトウェア会社は LLM ベースの役割で構成されている](resources/software_company_cd.jpeg)
33
+
34
+ <p align="center">ソフトウェア会社のマルチロール図式(順次導入)</p>
35
+
36
+ ## MetaGPT の能力
37
+
38
+
39
+ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace413419
40
+
41
+
42
+
43
+ ## 例(GPT-4 で完全生成)
44
+
45
+ 例えば、`metagpt "Toutiao のような RecSys をデザインする"`と入力すると、多くの出力が得られます
46
+
47
+ ![Jinri Toutiao Recsys データと API デザイン](resources/workspace/content_rec_sys/resources/data_api_design.png)
48
+
49
+ 解析と設計を含む 1 つの例を生成するのに約 **$0.2**(GPT-4 の API 使用料)、完全なプロジェクトでは約 **$2.0** かかります。
50
+
51
+
52
+
53
+
54
+ ## インストール
55
+
56
+ ### インストールビデオガイド
57
+
58
+ - [Matthew Berman: How To Install MetaGPT - Build A Startup With One Prompt!!](https://youtu.be/uT75J_KG_aY)
59
+
60
+ ### 伝統的なインストール
61
+ > Python 3.9 以上がシステムにインストールされていることを確認してください。これは `python --version` を使ってチェックできます。
62
+ > 以下のようにcondaを使うことができます:`conda create -n metagpt python=3.9 && conda activate metagpt`
63
+
64
+ ```bash
65
+ pip install metagpt
66
+ metagpt --init-config # ~/.metagpt/config2.yaml を作成し、自分の設定に合わせて変更してください
67
+ metagpt "2048ゲームを作成する" # これにより ./workspace にリポジトリが作成されます
68
+ ```
69
+
70
+ または、ライブラリとして使用することもできます
71
+
72
+ ```python
73
+ from metagpt.software_company import generate_repo, ProjectRepo
74
+ repo: ProjectRepo = generate_repo("2048ゲームを作成する") # または ProjectRepo("<パス>")
75
+ print(repo) # リポジトリの構造とファイルを出力します
76
+ ```
77
+
78
+ **注:**
79
+
80
+ - すでに Chrome、Chromium、MS Edge がインストールされている場合は、環境変数 `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` を `true` に設定することで、
81
+ Chromium のダウンロードをスキップすることができます。
82
+
83
+ - このツールをグローバルにインストールする[問題を抱えている](https://github.com/mermaidjs/mermaid.cli/issues/15)人もいます。ローカルにインストールするのが代替の解決策です、
84
+
85
+ ```bash
86
+ npm install @mermaid-js/mermaid-cli
87
+ ```
88
+
89
+ - config.yml に mmdc のコンフィグを記述するのを忘れないこと
90
+
91
+ ```yml
92
+ puppeteer_config: "./config/puppeteer-config.json"
93
+ path: "./node_modules/.bin/mmdc"
94
+ ```
95
+
96
+ - もし `pip install -e.` がエラー `[Errno 13] Permission denied: '/usr/local/lib/python3.11/dist-packages/test-easy-install-13129.write-test'` で失敗したら、代わりに `pip install -e. --user` を実行してみてください
97
+
98
+ - Mermaid charts を SVG、PNG、PDF 形式に変換します。Node.js 版の Mermaid-CLI に加えて、Python 版の Playwright、pyppeteer、または mermaid.ink をこのタスクに使用できるようになりました。
99
+
100
+ - Playwright
101
+ - **Playwright のインストール**
102
+
103
+ ```bash
104
+ pip install playwright
105
+ ```
106
+
107
+ - **必要なブラウザのインストール**
108
+
109
+ PDF変換をサポートするには、Chrominumをインストールしてください。
110
+
111
+ ```bash
112
+ playwright install --with-deps chromium
113
+ ```
114
+
115
+ - **modify `config2.yaml`**
116
+
117
+ config2.yaml から mermaid.engine のコメントを外し、`playwright` に変更する
118
+
119
+ ```yaml
120
+ mermaid:
121
+ engine: playwright
122
+ ```
123
+
124
+ - pyppeteer
125
+ - **pyppeteer のインストール**
126
+
127
+ ```bash
128
+ pip install pyppeteer
129
+ ```
130
+
131
+ - **自分のブラウザを使用**
132
+
133
+ pyppeteer を使えばインストールされているブラウザを使うことができます、以下の環境を設定してください
134
+
135
+ ```bash
136
+ export PUPPETEER_EXECUTABLE_PATH = /path/to/your/chromium or edge or chrome
137
+ ```
138
+
139
+ ブラウザのインストールにこのコマンドを使わないでください、これは古すぎます
140
+
141
+ ```bash
142
+ pyppeteer-install
143
+ ```
144
+
145
+ - **`config2.yaml` を修正**
146
+
147
+ config2.yaml から mermaid.engine のコメントを外し、`pyppeteer` に変更する
148
+
149
+ ```yaml
150
+ mermaid:
151
+ engine: pyppeteer
152
+ ```
153
+
154
+ - mermaid.ink
155
+ - **`config2.yaml` を修正**
156
+
157
+ config2.yaml から mermaid.engine のコメントを外し、`ink` に変更する
158
+
159
+ ```yaml
160
+ mermaid:
161
+ engine: ink
162
+ ```
163
+
164
+ 注: この方法は pdf エクスポートに対応していません。
165
+
166
+ ### Docker によるインストール
167
+ > Windowsでは、"/opt/metagpt"をDockerが作成する権限を持つディレクトリに置き換える必要があります。例えば、"D:\Users\x\metagpt"などです。
168
+
169
+ ```bash
170
+ # ステップ 1: metagpt 公式イメージをダウンロードし、config2.yaml を準備する
171
+ docker pull metagpt/metagpt:latest
172
+ mkdir -p /opt/metagpt/{config,workspace}
173
+ docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config2.yaml > /opt/metagpt/config/config2.yaml
174
+ vim /opt/metagpt/config/config2.yaml # 設定を変更する
175
+
176
+ # ステップ 2: コンテナで metagpt デモを実行する
177
+ docker run --rm \
178
+ --privileged \
179
+ -v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
180
+ -v /opt/metagpt/workspace:/app/metagpt/workspace \
181
+ metagpt/metagpt:latest \
182
+ metagpt "Write a cli snake game"
183
+
184
+ # コンテナを起動し、その中でコマンドを実行することもできます
185
+ docker run --name metagpt -d \
186
+ --privileged \
187
+ -v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
188
+ -v /opt/metagpt/workspace:/app/metagpt/workspace \
189
+ metagpt/metagpt:latest
190
+
191
+ docker exec -it metagpt /bin/bash
192
+ $ metagpt "Write a cli snake game"
193
+ ```
194
+
195
+ コマンド `docker run ...` は以下のことを行います:
196
+
197
+ - 特権モードで実行し、ブラウザの実行権限を得る
198
+ - ホスト設定ファイル `/opt/metagpt/config/config2.yaml` をコンテナ `/app/metagpt/config/config2.yaml` にマップします
199
+ - ホストディレクトリ `/opt/metagpt/workspace` をコンテナディレクトリ `/app/metagpt/workspace` にマップするs
200
+ - デモコマンド `metagpt "Write a cli snake game"` を実行する
201
+
202
+ ### 自分でイメージをビルドする
203
+
204
+ ```bash
205
+ # また、自分で metagpt イメージを構築することもできます。
206
+ git clone https://github.com/geekan/MetaGPT.git
207
+ cd MetaGPT && docker build -t metagpt:custom .
208
+ ```
209
+
210
+ ## 設定
211
+
212
+ - `api_key` を `~/.metagpt/config2.yaml / config/config2.yaml` のいずれかで設定します。
213
+ - 優先順位は: `~/.metagpt/config2.yaml > config/config2.yaml > env` の順です。
214
+
215
+ ```bash
216
+ # 設定ファイルをコピーし、必要な修正を加える。
217
+ cp config/config2.yaml ~/.metagpt/config2.yaml
218
+ ```
219
+
220
+ ## チュートリアル: スタートアップの開始
221
+
222
+ ```shell
223
+ # スクリプトの実行
224
+ metagpt "Write a cli snake game"
225
+ # プロジェクトの実施にエンジニアを雇わないこと
226
+ metagpt "Write a cli snake game" --no-implement
227
+ # エンジニアを雇い、コードレビューを行う
228
+ metagpt "Write a cli snake game" --code_review
229
+ ```
230
+
231
+ スクリプトを実行すると、`workspace/` ディレクトリに新しいプロジェクトが見つかります。
232
+
233
+ ### プラットフォームまたはツールの設定
234
+
235
+ 要件を述べるときに、どのプラットフォームまたはツールを使用するかを指定できます。
236
+
237
+ ```shell
238
+ metagpt "pygame をベースとした cli ヘビゲームを書く"
239
+ ```
240
+
241
+ ### 使用方法
242
+
243
+ ```
244
+ 会社名
245
+ metagpt - 私たちは AI で構成されたソフトウェア・スタートアップです。私たちに投資することは、無限の可能性に満ちた未来に力を与えることです。
246
+
247
+ シノプシス
248
+ metagpt IDEA <flags>
249
+
250
+ 説明
251
+ 私たちは AI で構成されたソフトウェア・スタートアップです。私たちに投資することは、無限の可能性に満ちた未来に力を与えることです。
252
+
253
+ 位置引数
254
+ IDEA
255
+ 型: str
256
+ あなたの革新的なアイデア、例えば"スネークゲームを作る。"など
257
+
258
+ フラグ
259
+ --investment=INVESTMENT
260
+ 型: float
261
+ デフォルト: 3.0
262
+ 投資家として、あなたはこの AI 企業に一定の金額を拠出する機会がある。
263
+ --n_round=N_ROUND
264
+ 型: int
265
+ デフォルト: 5
266
+
267
+ 注意事項
268
+ 位置引数にフラグ構文を使うこともできます
269
+ ```
270
+
271
+ ### コードウォークスルー
272
+
273
+ ```python
274
+ from metagpt.team import Team
275
+ from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer
276
+
277
+ async def startup(idea: str, investment: float = 3.0, n_round: int = 5):
278
+ """スタートアップを実行する。ボスになる。"""
279
+ company = Team()
280
+ company.hire([ProductManager(), Architect(), ProjectManager(), Engineer()])
281
+ company.invest(investment)
282
+ company.start_project(idea)
283
+ await company.run(n_round=n_round)
284
+ ```
285
+
286
+ `examples` でシングル・ロール(ナレッジ・ベース付き)と LLM のみの例を詳しく見ることができます。
287
+
288
+ ## クイックスタート
289
+
290
+ ローカル環境のインストールや設定は、ユーザーによっては難しいものです。以下のチュートリアルで MetaGPT の魅力をすぐに体験できます。
291
+
292
+ - [MetaGPT クイックスタート](https://deepwisdom.feishu.cn/wiki/CyY9wdJc4iNqArku3Lncl4v8n2b)
293
+
294
+ Hugging Face Space で試す
295
+ - https://huggingface.co/spaces/deepwisdom/MetaGPT-SoftwareCompany
296
+
297
+ ## 引用
298
+
299
+ 研究論文でMetaGPTやData Interpreterを使用する場合は、以下のように当社の作業を引用してください:
300
+
301
+ ```bibtex
302
+ @inproceedings{hong2024metagpt,
303
+ title={Meta{GPT}: Meta Programming for A Multi-Agent Collaborative Framework},
304
+ author={Sirui Hong and Mingchen Zhuge and Jonathan Chen and Xiawu Zheng and Yuheng Cheng and Jinlin Wang and Ceyao Zhang and Zili Wang and Steven Ka Shing Yau and Zijuan Lin and Liyang Zhou and Chenyu Ran and Lingfeng Xiao and Chenglin Wu and J{\"u}rgen Schmidhuber},
305
+ booktitle={The Twelfth International Conference on Learning Representations},
306
+ year={2024},
307
+ url={https://openreview.net/forum?id=VtmBAGCN7o}
308
+ }
309
+ @misc{hong2024data,
310
+ title={Data Interpreter: An LLM Agent For Data Science},
311
+ author={Sirui Hong and Yizhang Lin and Bang Liu and Bangbang Liu and Binhao Wu and Danyang Li and Jiaqi Chen and Jiayi Zhang and Jinlin Wang and Li Zhang and Lingyao Zhang and Min Yang and Mingchen Zhuge and Taicheng Guo and Tuo Zhou and Wei Tao and Wenyi Wang and Xiangru Tang and Xiangtao Lu and Xiawu Zheng and Xinbing Liang and Yaying Fei and Yuheng Cheng and Zongze Xu and Chenglin Wu},
312
+ year={2024},
313
+ eprint={2402.18679},
314
+ archivePrefix={arXiv},
315
+ primaryClass={cs.AI}
316
+ }
317
+ ```
318
+
319
+ ## お問い合わせ先
320
+
321
+ このプロジェクトに関するご質問やご意見がございましたら、お気軽にお問い合わせください。皆様のご意見をお待ちしております!
322
+
323
+ - **Email:** [email protected]
324
+ - **GitHub Issues:** 技術的なお問い合わせについては、[GitHub リポジトリ](https://github.com/geekan/metagpt/issues) に新しい issue を作成することもできます。
325
+
326
+ ご質問には 2-3 営業日以内に回答いたします。
327
+
328
+ ## デモ
329
+
330
+ https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d
331
+
332
+ ## 参加する
333
+
334
+ 📢 Discord チャンネルに参加してください!
335
+ https://discord.gg/ZRHeExS6xv
336
+
337
+ お会いできることを楽しみにしています! 🎉
docs/ROADMAP.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ## Roadmap
3
+
4
+ ### Long-term Objective
5
+
6
+ Enable MetaGPT to self-evolve, accomplishing self-training, fine-tuning, optimization, utilization, and updates.
7
+
8
+ ### Short-term Objective
9
+
10
+ 1. Become the multi-agent framework with the highest ROI.
11
+ 2. Support fully automatic implementation of medium-sized projects (around 2000 lines of code).
12
+ 3. Implement most identified tasks, reaching version 1.0.
13
+
14
+ ### Tasks
15
+
16
+ 1. Usability
17
+ 1. ~~Release v0.01 pip package to try to solve issues like npm installation (though not necessarily successfully)~~ (v0.3.0)
18
+ 2. ~~Support for overall save and recovery of software companies~~ (v0.6.0)
19
+ 3. ~~Support human confirmation and modification during the process~~ (v0.3.0) New: Support human confirmation and modification with fewer constrainsts and a more user-friendly interface
20
+ 4. Support process caching: Consider carefully whether to add server caching mechanism
21
+ 5. ~~Resolve occasional failure to follow instruction under current prompts, causing code parsing errors, through stricter system prompts~~ (v0.4.0, with function call)
22
+ 6. Write documentation, describing the current features and usage at all levels (ongoing, continuously adding contents to [documentation site](https://docs.deepwisdom.ai/main/en/guide/get_started/introduction.html))
23
+ 7. ~~Support Docker~~
24
+ 2. Features
25
+ 1. ~~Support a more standard and stable parser (need to analyze the format that the current LLM is better at)~~ (v0.5.0)
26
+ 2. ~~Establish a separate output queue, differentiated from the message queue~~ (v0.5.0)
27
+ 3. ~~Attempt to atomize all role work, but this may significantly increase token overhead~~ (v0.5.0)
28
+ 4. Complete the design and implementation of module breakdown
29
+ 5. Support various modes of memory: clearly distinguish between long-term and short-term memory
30
+ 6. Perfect the test role, and carry out necessary interactions with humans
31
+ 7. ~~Allowing natural communication between roles~~ (v0.5.0)
32
+ 8. Implement SkillManager and the process of incremental Skill learning (experimentation done with game agents)
33
+ 9. Automatically get RPM and configure it by calling the corresponding openai page, so that each key does not need to be manually configured
34
+ 10. ~~IMPORTANT: Support incremental development~~ (v0.5.0)
35
+ 3. Strategies
36
+ 1. Support ReAct strategy (experimentation done with game agents)
37
+ 2. Support CoT strategy (experimentation done with game agents)
38
+ 3. ~~Support ToT strategy~~ (v0.6.0)
39
+ 4. Support Reflection strategy (experimentation done with game agents)
40
+ 5. ~~Support planning~~ (v0.7.0)
41
+ 4. Actions
42
+ 1. ~~Implementation: Search~~ (v0.2.1)
43
+ 2. Implementation: Knowledge search, supporting 10+ data formats
44
+ 3. ~~Implementation: Data EDA~~ (v0.7.0)
45
+ 4. ~~Implementation: Review & Revise~~ (v0.7.0)
46
+ 5. ~~Implementation: Add Document~~ (v0.5.0)
47
+ 6. ~~Implementation: Delete Document~~ (v0.5.0)
48
+ 7. Implementation: Self-training
49
+ 8. ~~Implementation: DebugError~~ (v0.2.1)
50
+ 9. Implementation: Generate reliable unit tests based on YAPI
51
+ 10. Implementation: Self-evaluation
52
+ 11. Implementation: AI Invocation
53
+ 12. ~~Implementation: Learning and using third-party standard libraries~~ (v0.7.0)
54
+ 13. Implementation: Data collection
55
+ 14. Implementation: AI training
56
+ 15. ~~Implementation: Run code~~ (v0.2.1)
57
+ 16. ~~Implementation: Web access~~ (v0.2.1)
58
+ 5. Tools
59
+ 1. ~~Support SERPER api~~
60
+ 2. ~~Support Selenium apis~~
61
+ 3. ~~Support Playwright apis~~
62
+ 4. Plugins: Compatibility with plugin system
63
+ 6. Roles
64
+ 1. Perfect the action pool/skill pool for each role
65
+ 2. E-commerce seller
66
+ 3. ~~Data analyst~~ (v0.7.0)
67
+ 4. News observer
68
+ 5. ~~Institutional researcher~~ (v0.2.1)
69
+ 6. User
70
+ 7. Evaluation
71
+ 1. Support an evaluation on a game dataset (experimentation done with game agents)
72
+ 2. Reproduce papers, implement full skill acquisition for a single game role, achieving SOTA results (experimentation done with game agents)
73
+ 3. Support an evaluation on a math dataset (expected v0.8.0)
74
+ 4. Reproduce papers, achieving SOTA results for current mathematical problem solving process (expected v0.8.0)
75
+ 8. LLM
76
+ 1. ~~Support Claude underlying API~~
77
+ 2. ~~Support Azure asynchronous API~~
78
+ 3. ~~Support streaming version of all APIs~~
79
+ 4. ~~Make gpt-3.5-turbo available (HARD)~~
80
+ 9. Other
81
+ 1. ~~Clean up existing unused code~~
82
+ 2. ~~Unify all code styles and establish contribution standards~~
83
+ 3. ~~Multi-language support~~
84
+ 4. ~~Multi-programming-language support~~
docs/install/cli_install.md ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Traditional Command Line Installation
2
+
3
+ ### Support System and version
4
+ | System Version | Python Version | Supported |
5
+ | ---- | ---- | ----- |
6
+ | macOS 13.x | python 3.9 | Yes |
7
+ | Windows 11 | python 3.9 | Yes |
8
+ | Ubuntu 22.04 | python 3.9 | Yes |
9
+
10
+ ### Detail Installation
11
+ ```bash
12
+ # Step 1: Ensure that Python 3.9+ is installed on your system. You can check this by using:
13
+ # You can use conda to initialize a new python env
14
+ # conda create -n metagpt python=3.9
15
+ # conda activate metagpt
16
+ python3 --version
17
+
18
+ # Step 2: Clone the repository to your local machine for latest version, and install it.
19
+ git clone https://github.com/geekan/MetaGPT.git
20
+ cd MetaGPT
21
+ pip3 install -e . # or pip3 install metagpt # for stable version
22
+
23
+ # Step 3: setup your LLM key in the config2.yaml file
24
+ mkdir ~/.metagpt
25
+ cp config/config2.yaml ~/.metagpt/config2.yaml
26
+ vim ~/.metagpt/config2.yaml
27
+
28
+ # Step 4: run metagpt cli
29
+ metagpt "Create a 2048 game in python"
30
+
31
+ # 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.
32
+ # 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.)
33
+ npm --version
34
+ sudo npm install -g @mermaid-js/mermaid-cli
35
+ ```
36
+
37
+ **Note:**
38
+
39
+ - If already have Chrome, Chromium, or MS Edge installed, you can skip downloading Chromium by setting the environment variable
40
+ `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` to `true`.
41
+
42
+ - Some people are [having issues](https://github.com/mermaidjs/mermaid.cli/issues/15) installing this tool globally. Installing it locally is an alternative solution,
43
+
44
+ ```bash
45
+ npm install @mermaid-js/mermaid-cli
46
+ ```
47
+
48
+ - don't forget to the configuration for mmdc path in config.yml
49
+
50
+ ```yaml
51
+ mermaid:
52
+ puppeteer_config: "./config/puppeteer-config.json"
53
+ path: "./node_modules/.bin/mmdc"
54
+ ```
55
+
56
+ - if `pip install -e.` fails with error `[Errno 13] Permission denied: '/usr/local/lib/python3.11/dist-packages/test-easy-install-13129.write-test'`, try instead running `pip install -e. --user`
57
+
58
+ - To convert Mermaid charts to SVG, PNG, and PDF formats. In addition to the Node.js version of Mermaid-CLI, you now have the option to use Python version Playwright, pyppeteer or mermaid.ink for this task.
59
+
60
+ - Playwright
61
+ - **Install Playwright**
62
+
63
+ ```bash
64
+ pip install playwright
65
+ ```
66
+
67
+ - **Install the Required Browsers**
68
+
69
+ to support PDF conversion, please install Chrominum.
70
+
71
+ ```bash
72
+ playwright install --with-deps chromium
73
+ ```
74
+
75
+ - **modify `config2.yaml`**
76
+
77
+ change mermaid.engine to `playwright`
78
+
79
+ ```yaml
80
+ mermaid:
81
+ engine: playwright
82
+ ```
83
+
84
+ - pyppeteer
85
+ - **Install pyppeteer**
86
+
87
+ ```bash
88
+ pip install pyppeteer
89
+ ```
90
+
91
+ - **Use your own Browsers**
92
+
93
+ pyppeteer allows you use installed browsers, please set the following envirment
94
+
95
+ ```bash
96
+ export PUPPETEER_EXECUTABLE_PATH = /path/to/your/chromium or edge or chrome
97
+ ```
98
+
99
+ please do not use this command to install browser, it is too old
100
+
101
+ ```bash
102
+ pyppeteer-install
103
+ ```
104
+
105
+ - **modify `config2.yaml`**
106
+
107
+ change mermaid.engine to `pyppeteer`
108
+
109
+ ```yaml
110
+ mermaid:
111
+ engine: pyppeteer
112
+ ```
113
+
114
+ - mermaid.ink
115
+ - **modify `config2.yaml`**
116
+
117
+ change mermaid.engine to `ink`
118
+
119
+ ```yaml
120
+ mermaid:
121
+ engine: ink
122
+ ```
123
+
124
+ Note: this method does not support pdf export.
125
+
docs/install/cli_install_cn.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## 命令行安装
2
+
3
+ ### 支持的系统和版本
4
+ | 系统版本 | Python 版本 | 是否支持 |
5
+ | ---- | ---- | ----- |
6
+ | macOS 13.x | python 3.9 | 是 |
7
+ | Windows 11 | python 3.9 | 是 |
8
+ | Ubuntu 22.04 | python 3.9 | 是 |
9
+
10
+ ### 详细安装
11
+
12
+ ```bash
13
+ # 步骤 1: 确保您的系统安装了 Python 3.9 或更高版本。您可以使用以下命令来检查:
14
+ # 您可以使用 conda 来初始化一个新的 Python 环境
15
+ # conda create -n metagpt python=3.9
16
+ # conda activate metagpt
17
+ python3 --version
18
+
19
+ # 步骤 2: 克隆仓库到您的本地机器以获取最新版本,并安装它。
20
+ git clone https://github.com/geekan/MetaGPT.git
21
+ cd MetaGPT
22
+ pip3 install -e . # 或 pip3 install metagpt # 用于稳定版本
23
+
24
+ # 步骤 3: 在 config2.yaml 文件中设置您的 LLM 密钥
25
+ mkdir ~/.metagpt
26
+ cp config/config2.yaml ~/.metagpt/config2.yaml
27
+ vim ~/.metagpt/config2.yaml
28
+
29
+ # 步骤 4: 运行 metagpt 命令行界面
30
+ metagpt "用 python 创建一个 2048 游戏"
31
+
32
+ # 步骤 5 [可选]: 如果您想保存诸如象限图、系统设计、序列流等图表作为工作空间的工件,您可以在执行步骤 3 之前执行此步骤。默认情况下,该框架是兼容的,整个过程可以完全不执行此步骤而运行。
33
+ # 如果执行此步骤,请确保您的系统上安装了 NPM。然后安装 mermaid-js。(如果您的计算机中没有 npm,请访问 Node.js 官方网站 https://nodejs.org/ 安装 Node.js,然后您将在计算机中拥有 npm 工具。)
34
+ npm --version
35
+ sudo npm install -g @mermaid-js/mermaid-cli
36
+ ```
37
+
38
+ **注意:**
39
+
40
+ - 如果已经安装了Chrome、Chromium或MS Edge,可以通过将环境变量`PUPPETEER_SKIP_CHROMIUM_DOWNLOAD`设置为`true`来跳过下载Chromium。
41
+
42
+ - 一些人在全局安装此工具时遇到问题。在本地安装是替代解决方案,
43
+
44
+ ```bash
45
+ npm install @mermaid-js/mermaid-cli
46
+ ```
47
+
48
+ - 不要忘记在config.yml中为mmdc配置
49
+
50
+ ```yml
51
+ mermaid:
52
+ puppeteer_config: "./config/puppeteer-config.json"
53
+ path: "./node_modules/.bin/mmdc"
54
+ ```
55
+
56
+ - 如果`pip install -e.`失败并显示错误`[Errno 13] Permission denied: '/usr/local/lib/python3.11/dist-packages/test-easy-install-13129.write-test'`,请尝试使用`pip install -e. --user`运行。
docs/install/docker_install.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Docker Installation
2
+
3
+ ### Use default MetaGPT image
4
+
5
+ ```bash
6
+ # Step 1: Download metagpt official image and prepare config2.yaml
7
+ docker pull metagpt/metagpt:latest
8
+ mkdir -p /opt/metagpt/{config,workspace}
9
+ docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config2.yaml > /opt/metagpt/config/config2.yaml
10
+ vim /opt/metagpt/config/config2.yaml # Change the config
11
+
12
+ # Step 2: Run metagpt demo with container
13
+ docker run --rm \
14
+ --privileged \
15
+ -v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
16
+ -v /opt/metagpt/workspace:/app/metagpt/workspace \
17
+ metagpt/metagpt:latest \
18
+ metagpt "Write a cli snake game"
19
+
20
+ # You can also start a container and execute commands in it
21
+ docker run --name metagpt -d \
22
+ --privileged \
23
+ -v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
24
+ -v /opt/metagpt/workspace:/app/metagpt/workspace \
25
+ metagpt/metagpt:latest
26
+
27
+ docker exec -it metagpt /bin/bash
28
+ $ metagpt "Write a cli snake game"
29
+ ```
30
+
31
+ The command `docker run ...` do the following things:
32
+
33
+ - Run in privileged mode to have permission to run the browser
34
+ - Map host configure file `/opt/metagpt/config/config2.yaml` to container `/app/metagpt/config/config2.yaml`
35
+ - Map host directory `/opt/metagpt/workspace` to container `/app/metagpt/workspace`
36
+ - Execute the demo command `metagpt "Write a cli snake game"`
37
+
38
+ ### Build image by yourself
39
+
40
+ ```bash
41
+ # You can also build metagpt image by yourself.
42
+ git clone https://github.com/geekan/MetaGPT.git
43
+ cd MetaGPT && docker build -t metagpt:custom .
44
+ ```
docs/install/docker_install_cn.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Docker安装
2
+
3
+ ### 使用MetaGPT镜像
4
+
5
+ ```bash
6
+ # 步骤1: 下载metagpt官方镜像并准备好config2.yaml
7
+ docker pull metagpt/metagpt:latest
8
+ mkdir -p /opt/metagpt/{config,workspace}
9
+ docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config2.yaml > /opt/metagpt/config/config2.yaml
10
+ vim /opt/metagpt/config/config2.yaml # 修改配置文件
11
+
12
+ # 步骤2: 使用容器运行metagpt演示
13
+ docker run --rm \
14
+ --privileged \
15
+ -v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
16
+ -v /opt/metagpt/workspace:/app/metagpt/workspace \
17
+ metagpt/metagpt:latest \
18
+ metagpt "Write a cli snake game"
19
+
20
+ # 您也可以启动一个容器并在其中执行命令
21
+ docker run --name metagpt -d \
22
+ --privileged \
23
+ -v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
24
+ -v /opt/metagpt/workspace:/app/metagpt/workspace \
25
+ metagpt/metagpt:latest
26
+
27
+ docker exec -it metagpt /bin/bash
28
+ $ metagpt "Write a cli snake game"
29
+ ```
30
+
31
+ `docker run ...`做了以下事情:
32
+
33
+ - 以特权模式运行,有权限运行浏览器
34
+ - 将主机文件 `/opt/metagpt/config/config2.yaml` 映射到容器文件 `/app/metagpt/config/config2.yaml`
35
+ - 将主机目录 `/opt/metagpt/workspace` 映射到容器目录 `/app/metagpt/workspace`
36
+ - 执行示例命令 `metagpt "Write a cli snake game"`
37
+
38
+ ### 自己构建镜像
39
+
40
+ ```bash
41
+ # 您也可以自己构建metagpt镜像
42
+ git clone https://github.com/geekan/MetaGPT.git
43
+ cd MetaGPT && docker build -t metagpt:custom .
44
+ ```