Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 0.7: merge dev #852

Merged
merged 855 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
855 commits
Select commit Hold shift + click to select a range
f15b772
feat: +note
Jan 22, 2024
85465fe
feat: +note
Jan 22, 2024
9d452a9
Merge pull request #768 from iorisa/feature/merge/v0.6-release
geekan Jan 22, 2024
2eb5e2f
Merge branch 'dev' of https://github.com/geekan/MetaGPT into geekan/dev
Jan 22, 2024
76d4451
merge main to dev
mannaandpoem Jan 22, 2024
767826e
Merge branch 'dev' into dev_origin
mannaandpoem Jan 22, 2024
0f245f5
logging
garylin2099 Jan 22, 2024
5ddaaaa
add test: test_get_choice_function_arguments_for_aask_code.
orange-crow Jan 22, 2024
9b3987f
add docstring parser
garylin2099 Jan 22, 2024
33e13b6
typo
garylin2099 Jan 22, 2024
6cb2910
fix: now present the results of failure and success code in different…
orange-crow Jan 22, 2024
ff31438
Merge branch 'dev' of https://github.com/geekan/MetaGPT into geekan/dev
Jan 22, 2024
c96b517
add test.
orange-crow Jan 22, 2024
f3d2957
resolve zhipu 2.0.1
geekan Jan 22, 2024
47af196
fix pybrowsers not found
shenchucheng Jan 22, 2024
1793a5f
update function_rsps.
orange-crow Jan 22, 2024
64a296a
update logger warning for JSONDecodeError.
orange-crow Jan 22, 2024
bcfb7e0
Merge pull request #782 from shenchucheng/fix-pybrowsers-dep
geekan Jan 22, 2024
7f5f95d
Merge branch 'tool_manage_new' into 'code_intepreter'
garylin2099 Jan 22, 2024
e8b3e67
feat: replace global CONTEXT with Config()
Jan 22, 2024
3bfd0c8
update truncate.
orange-crow Jan 22, 2024
452f6e2
fix bugs
geekan Jan 22, 2024
1bf9e02
add new test.
orange-crow Jan 22, 2024
0ad3de6
update _process_code.
orange-crow Jan 22, 2024
246d887
update rsp cache
geekan Jan 22, 2024
7f78c56
Merge pull request #784 from iorisa/feature/remove_global_context
geekan Jan 22, 2024
8b13783
add rsp cache
geekan Jan 22, 2024
93538cc
Merge branch 'add-test-for-aask_code-executecode' into 'code_intepreter'
garylin2099 Jan 22, 2024
32f9fbb
Merge branch 'dev' into dev_incremental
mannaandpoem Jan 23, 2024
987eb6d
fix: now support parsing code in message.content when using tools_call.
orange-crow Jan 23, 2024
31813f2
add new test for tool_calls_rsp.
orange-crow Jan 23, 2024
a06d802
update CodeParser.parse_code.
orange-crow Jan 23, 2024
cff4eff
update CodeParser.parse_code.
orange-crow Jan 23, 2024
0cc0a16
add new test for tool_calls_rsp.
orange-crow Jan 23, 2024
bcda7ac
add comments for openai tools_call respond bug.
orange-crow Jan 23, 2024
519f22f
update CodeInterpreter._write_and_exec_code
orange-crow Jan 23, 2024
0e41973
1. update CodePlanAndChangeContext in schema.py
mannaandpoem Jan 23, 2024
2d9a6c3
Merge branch 'fix-openai-tools_call-respond-bug' into 'code_intepreter'
garylin2099 Jan 23, 2024
d60a4c1
Merge branch 'update-CodeInterpreter._write_and_exec_code' into 'code…
garylin2099 Jan 23, 2024
62c1286
1. update bug of getting requirement_doc
mannaandpoem Jan 24, 2024
ff5e7de
add strip for result.
orange-crow Jan 24, 2024
dfe49a3
update return value.
orange-crow Jan 24, 2024
3f2b512
new file: tests/metagpt/tools/libs/test_web_scraping.py
orange-crow Jan 24, 2024
e42dc52
Fix bug in WriteCode
mannaandpoem Jan 24, 2024
0c8a844
add strip for result.
orange-crow Jan 24, 2024
0353f36
new file: examples/crawle_webpage.py
orange-crow Jan 24, 2024
094d7c2
fixbug: The startup parameters of the program have been lost.
Jan 24, 2024
3450c24
remove mode of get_codes function
mannaandpoem Jan 24, 2024
db8ae71
update comment in get_codes function
mannaandpoem Jan 24, 2024
92384d7
update comment in get_codes function
mannaandpoem Jan 24, 2024
48cb6c6
feat: support config2.yaml
voidking Jan 24, 2024
e761612
Merge remote-tracking branch 'origin/dev_incremental' into dev_increm…
mannaandpoem Jan 24, 2024
5af94ae
update comment in get_codes function
mannaandpoem Jan 24, 2024
4482156
feat: support config2.yaml
voidking Jan 24, 2024
02b4608
changed {tasks} to {task} in PROMPT_TEMPLATE
mannaandpoem Jan 24, 2024
7e328e5
changed {tasks} to {task} in PROMPT_TEMPLATE
mannaandpoem Jan 24, 2024
431e536
changed tasks to task
mannaandpoem Jan 24, 2024
8bdc1a9
Merge pull request #789 from voidking/dev
geekan Jan 24, 2024
ac98df9
Merge pull request #787 from mannaandpoem/dev_incremental
iorisa Jan 24, 2024
49f0b6b
Merge branch 'dev' of https://github.com/geekan/MetaGPT into geekan/dev
Jan 24, 2024
d51d262
fixbug: module 'mock' has no attribute 'patch'
Jan 24, 2024
59b2e5e
Merge pull request #791 from iorisa/fixbug/unittest
garylin2099 Jan 24, 2024
f9f6dbe
Add the tar command to extract the .zip file
mannaandpoem Jan 25, 2024
0faae93
Add the tar command to extract the .zip file
mannaandpoem Jan 25, 2024
74aa0aa
Merge branch 'mannaandpoem/dev_incremental' into geekan/dev
Jan 25, 2024
f1a4197
rm make tools in ci for now
garylin2099 Jan 25, 2024
5f62484
Merge branch 'tool_manage_new' into 'code_intepreter'
garylin2099 Jan 25, 2024
526025b
change file name: crawle_webpage.py -> crawl_webpage.py
orange-crow Jan 25, 2024
54a0874
chore
orange-crow Jan 25, 2024
1fb7712
Merge branch 'add-web-scraping-test' into 'code_intepreter'
garylin2099 Jan 25, 2024
7aa89a3
minor update
garylin2099 Jan 25, 2024
51169d7
feat: + compatible with windows path
Jan 25, 2024
442f2cf
Merge pull request #794 from mannaandpoem/dev_incremental
iorisa Jan 25, 2024
44b550f
Merge branch 'dev' of https://github.com/geekan/MetaGPT into geekan/dev
Jan 25, 2024
1f90bc5
1. Update the code compression package
mannaandpoem Jan 25, 2024
a94ccbc
Merge branch 'mannaandpoem/dev_incremental' into geekan/dev
Jan 25, 2024
4680ff5
Only retain test_simple_add_calculator, skip other test cases
mannaandpoem Jan 25, 2024
b2e020a
Merge pull request #798 from mannaandpoem/dev_incremental
geekan Jan 26, 2024
d4ae2a8
Merge pull request #797 from iorisa/feature/compatible_windows
geekan Jan 26, 2024
a6bdd02
add ActionNode.from_pydantic
geekan Jan 26, 2024
aada81b
fix conflicts
geekan Jan 26, 2024
782875d
Merge branch 'dev' of https://github.com/geekan/MetaGPT into geekan/dev
Jan 27, 2024
06b4e47
feat: generate_repo return ProjectRepo
Jan 29, 2024
e9d7c99
Merge branch 'dev' of https://github.com/geekan/MetaGPT into geekan/dev
Jan 29, 2024
9e49e22
Merge pull request #803 from iorisa/feature/return_project_repo
geekan Jan 30, 2024
3106872
add gpt-4v support for aask and AN.fill
better629 Jan 30, 2024
e7cd90f
add openai dall-e support
better629 Jan 30, 2024
df728a0
simplify code
better629 Jan 30, 2024
606f1b8
accept goal during run; move more logic from role to planner
garylin2099 Jan 30, 2024
31a9410
Merge branch 'tool_manage_new' into 'code_intepreter'
garylin2099 Jan 30, 2024
1d772e8
update base env and android_env
better629 Jan 30, 2024
210a00c
add werewolf_env
better629 Jan 30, 2024
29e8a07
add stanford_town_env
better629 Jan 30, 2024
37c3f3b
add mincraft_env
better629 Jan 30, 2024
51f0041
add software_env
better629 Jan 30, 2024
6b1f3ee
add dalle/gpt4v example
better629 Jan 30, 2024
c8df235
update format
better629 Jan 30, 2024
f9e4a78
update
better629 Jan 30, 2024
4a7929d
rm immature code, improve naming, add unittest test rsp cache
garylin2099 Jan 30, 2024
ede04f2
fix test_write_analysis_code
garylin2099 Jan 30, 2024
274747e
fix test_debug_code
garylin2099 Jan 30, 2024
5dde5a8
rm unused & format
garylin2099 Jan 30, 2024
a8b4dfb
Merge branch 'add_unittest' into 'code_intepreter'
garylin2099 Jan 30, 2024
2fcb2a1
Merge branch 'dev' into code_intepreter
garylin2099 Jan 30, 2024
f9519ca
change ways of using config
garylin2099 Jan 30, 2024
56f5dc9
fix planner serialization bug, add test data
garylin2099 Jan 31, 2024
a9ef85b
add gptv config
garylin2099 Jan 31, 2024
7cead19
fix: add arg for OpenAILLM in test_get_choice_function_arguments_for_…
orange-crow Jan 31, 2024
56f640d
delete test_make_client_kwargs_without_proxy_azure.
orange-crow Jan 31, 2024
41907b1
add action graph, solver, search space.
geekan Jan 31, 2024
16f54ab
use gpt-4-turbo-preview as default
geekan Jan 31, 2024
b8d0547
Merge branch 'update-test_get_choice_function_arguments_for_aask_code…
garylin2099 Jan 31, 2024
30de3b4
fix message init bug
garylin2099 Jan 31, 2024
2d372a8
Merge branch 'dev' into feat_new_env
better629 Jan 31, 2024
b585064
rm redundant
garylin2099 Jan 31, 2024
fc412e5
fix tests/metagpt/learn/test_google_search.py error
shenchucheng Jan 31, 2024
d74dab9
update sd ut
stellaHSR Jan 31, 2024
7d38181
Merge branch 'code_intepreter' of https://gitlab.deepwisdomai.com/age…
stellaHSR Jan 31, 2024
28b0323
add package for test_sd_engine
stellaHSR Jan 31, 2024
324a81d
Merge pull request #812 from shenchucheng/fix-google-search-ut-error
garylin2099 Jan 31, 2024
c44d08c
rm config get in dev
stellaHSR Jan 31, 2024
54388d0
refine comments
geekan Jan 31, 2024
ad1edf6
refine comments
geekan Jan 31, 2024
a1b16b7
fix ml_engineer test
garylin2099 Jan 31, 2024
f8d69ed
Merge branch 'dev' into code_intepreter
garylin2099 Jan 31, 2024
487169e
rm mle_simple for now
garylin2099 Jan 31, 2024
b9663ce
fix parse_code bug.
orange-crow Jan 31, 2024
15e72ca
chore.
orange-crow Jan 31, 2024
df58d55
Merge branch 'fix-parse_code' into 'code_intepreter'
garylin2099 Jan 31, 2024
6656ebf
add ask_review, write plan, ci test
garylin2099 Jan 31, 2024
e0191c9
Merge branch 'dev' of https://github.com/geekan/MetaGPT into geekan/dev
Jan 31, 2024
f4c6e50
fixbug: make unit test stable
Jan 31, 2024
a762e02
update config usage
geekan Jan 31, 2024
c3d4af6
rm unnecessary
garylin2099 Jan 31, 2024
37a606d
rm unfinished
garylin2099 Jan 31, 2024
ff970ab
Merge branch 'dev' into code_intepreter
garylin2099 Jan 31, 2024
5f84003
Merge pull request #815 from iorisa/fixbug/unittest
garylin2099 Feb 1, 2024
90f84ad
Update FAQ-EN.md
geekan Feb 1, 2024
026dd81
Update cli_install.md
geekan Feb 1, 2024
3fa2b32
refine docs
geekan Feb 1, 2024
c0a4d7c
update fix of pr review
better629 Feb 1, 2024
7e97334
refine docs
geekan Feb 1, 2024
c20aecf
feat: auto-unittest
voidking Jan 31, 2024
097128f
refine docs
geekan Feb 1, 2024
6e4b0c1
refine docs
geekan Feb 1, 2024
bb34af3
refine docs
geekan Feb 1, 2024
45acde0
use pytest to mock, rm dependency
garylin2099 Feb 1, 2024
e85f749
Merge branch 'ci_sd_ut_new' into 'code_intepreter'
garylin2099 Feb 1, 2024
a214a56
chore: auto unittest remove debugger
voidking Feb 1, 2024
4c1e624
Merge pull request #817 from voidking/dev
garylin2099 Feb 1, 2024
64eea6e
add action node example
geekan Feb 1, 2024
f3cb2cf
Merge branch 'main' into dev
geekan Feb 1, 2024
62ca2ca
refactor config
geekan Feb 1, 2024
97868be
refactor config
geekan Feb 1, 2024
bafdfe8
refactor config
geekan Feb 1, 2024
82ecee9
chore: trigger unittest by push
voidking Feb 1, 2024
cb9e103
chore: trigger unittest by push
voidking Feb 1, 2024
669b699
Merge pull request #818 from voidking/dev
garylin2099 Feb 1, 2024
b2de082
add action node example
geekan Feb 1, 2024
9ecdccd
add action node example
geekan Feb 1, 2024
3a4acb8
update werewolf_ext_env to add role permission protection and remove …
better629 Feb 1, 2024
b1da79c
refine naming and some details
garylin2099 Feb 1, 2024
afb702c
Merge branch 'dev' into code_intepreter
garylin2099 Feb 1, 2024
52a9447
remove environment const into individual const.py
better629 Feb 1, 2024
e8c333b
try to fix run code error.
geekan Feb 1, 2024
9b613ee
remove global config in the search/browser engine
shenchucheng Feb 1, 2024
e246a9c
update docs
shenchucheng Feb 1, 2024
9f4ee42
update env api schema
better629 Feb 1, 2024
2abc14a
update const value import path
better629 Feb 1, 2024
2897981
task utils etc.
garylin2099 Feb 1, 2024
e7ae79b
Merge branch 'dev' into code_intepreter
garylin2099 Feb 1, 2024
4cd09e7
file read write utils
garylin2099 Feb 1, 2024
1a1610a
add more comments
garylin2099 Feb 1, 2024
a515f70
add the browser config example
shenchucheng Feb 2, 2024
ec97645
Merge pull request #820 from shenchucheng/feature-remove-config
geekan Feb 2, 2024
5d95447
add README to guide followed development
better629 Feb 2, 2024
119bc0d
Merge pull request #809 from better629/feat_new_env
geekan Feb 2, 2024
dcb0623
1. Dev compatible with windows path
mannaandpoem Feb 2, 2024
35438e7
role pydantic init
garylin2099 Feb 2, 2024
5edee12
compatible with windows path
mannaandpoem Feb 2, 2024
6d60d32
Merge pull request #825 from mannaandpoem/dev_compatible_with_windows…
geekan Feb 2, 2024
18b0eaa
compatible with windows path
mannaandpoem Feb 2, 2024
f605fc4
Add type annotations, describe function return values, and remove unu…
orange-crow Feb 2, 2024
e71755e
add docstring
Feb 2, 2024
0118712
Merge pull request #826 from mannaandpoem/dev_compatible_with_windows…
geekan Feb 2, 2024
f6824b0
fix ContextMixin ut error
shenchucheng Feb 2, 2024
3125f4c
remove extra value after model_validator in Role/ContextMixin
shenchucheng Feb 2, 2024
fab4d73
add optional flag
Feb 2, 2024
8b4db5f
Merge pull request #827 from shenchucheng/fix-context-mixin-ut-error
geekan Feb 2, 2024
05ef256
chore: rename workflows
voidking Feb 2, 2024
19b5ede
Merge pull request #829 from voidking/dev
geekan Feb 2, 2024
1da50f1
remove ToolTypesEnum
garylin2099 Feb 2, 2024
188f7aa
Remove unused code.
orange-crow Feb 2, 2024
29baea4
Merge branch 'fe_docstring' into 'code_intepreter'
garylin2099 Feb 2, 2024
c9f6b7c
1. merge run and run_reflection; 2. remove useless code
stellaHSR Feb 2, 2024
0336010
Merge branch 'code_intepreter' of https://gitlab.deepwisdomai.com/age…
garylin2099 Feb 2, 2024
f742827
fix not fully defined error
shenchucheng Feb 2, 2024
32fb353
Merge branch 'update-execute_nb_code.py' into 'code_intepreter'
garylin2099 Feb 2, 2024
3894334
Merge branch 'code_intepreter' of https://gitlab.deepwisdomai.com/age…
garylin2099 Feb 2, 2024
4938896
rm yaml, add docstring
garylin2099 Feb 2, 2024
a74afd6
Merge branch 'ci_debugcode_modify' into 'code_intepreter'
garylin2099 Feb 2, 2024
a7cb21a
Merge pull request #833 from shenchucheng/fix-role-not-fully-defined-…
geekan Feb 2, 2024
6754d89
update ci cache
garylin2099 Feb 2, 2024
891e35b
Merge branch 'dev' into code_intepreter
garylin2099 Feb 2, 2024
c6ac7ef
fix web scrape init
garylin2099 Feb 2, 2024
a758782
bugfix: unittest to fulltest
voidking Feb 2, 2024
2a096ad
rm unnecessary test datasets
garylin2099 Feb 2, 2024
2eeb955
Merge pull request #834 from voidking/dev
garylin2099 Feb 2, 2024
f2dbb51
update code due to failed unittests
better629 Feb 3, 2024
05e2f3b
add stanford_town ville env files
better629 Feb 3, 2024
3648669
fix test_ut_writer failure due to aask_code mock
garylin2099 Feb 4, 2024
24d2c5c
isolate codes to be restructured in the future
garylin2099 Feb 4, 2024
b7d0379
rm experimental code
garylin2099 Feb 4, 2024
2a16c7e
Merge pull request #836 from better629/feat_new_env
geekan Feb 4, 2024
d1deb0f
Remove _parse_arguments function and comment out handle_exception dec…
orange-crow Feb 4, 2024
4caa1ec
Revert CodeParser.parse_code function to version 0.6.6.
orange-crow Feb 4, 2024
4b912cc
update test.
orange-crow Feb 4, 2024
b4d032c
chore.
orange-crow Feb 4, 2024
321a4c0
rm redundant function and docstring in libs
garylin2099 Feb 4, 2024
55dac10
fix bug and update cache
garylin2099 Feb 4, 2024
4cfee3b
rm code steps, mv planner, mv ci mle
garylin2099 Feb 4, 2024
8c65ed0
rm redundant docstring
garylin2099 Feb 4, 2024
9af2508
Merge branch 'simplify_tools' into 'code_intepreter'
garylin2099 Feb 4, 2024
ca6749b
Merge branch 'del-_parse_arguments-in-openai_api.py' into code_intepr…
garylin2099 Feb 4, 2024
a609946
mv tool_type def
garylin2099 Feb 4, 2024
a35f536
raise error directly if invalid json
garylin2099 Feb 4, 2024
20393e9
rename tool type
garylin2099 Feb 5, 2024
748aabc
add future; rename writecodebygenerate tools
garylin2099 Feb 5, 2024
9343a6b
mv pip success logic, rm redundant prompt
garylin2099 Feb 5, 2024
4027043
improve details
garylin2099 Feb 5, 2024
23c2762
Merge pull request #736 from garylin2099/code_intepreter
geekan Feb 5, 2024
6015c16
remove get_result method and improve gpt_v_generator.py and test_gpt_…
mannaandpoem Feb 5, 2024
5abde78
remove get_result method and improve gpt_v_generator.py and test_gpt_…
mannaandpoem Feb 5, 2024
9b72370
update webscraping tool
garylin2099 Feb 5, 2024
4dd4695
Merge pull request #843 from garylin2099/ci_dev
garylin2099 Feb 5, 2024
675b96b
remove attribute openai_vision_model and vision_max_tokens and method…
mannaandpoem Feb 6, 2024
da12311
Merge pull request #842 from mannaandpoem/dev_add_gpt_v
geekan Feb 6, 2024
1f172b3
fix RecursionError: maximum recursion depth exceeded while calling a …
better629 Feb 6, 2024
1855b2b
add cache result for gpt-4v
better629 Feb 6, 2024
4616749
Merge pull request #845 from better629/dev
geekan Feb 6, 2024
0fe854f
fix save code
garylin2099 Feb 6, 2024
cb402b7
Merge pull request #846 from garylin2099/ci_dev
garylin2099 Feb 6, 2024
5f758cd
Merge branch 'dev' into ci_dev
garylin2099 Feb 6, 2024
3852e05
Merge branch 'code_interpreter' into ci_dev
garylin2099 Feb 6, 2024
2a496ca
Merge pull request #847 from geekan/code_interpreter
geekan Feb 6, 2024
5abc5c3
add async fn type to tool schema
garylin2099 Feb 6, 2024
d2ed0da
Merge pull request #848 from garylin2099/ci_dev
garylin2099 Feb 6, 2024
beda29b
add async fn type to tool schema
garylin2099 Feb 6, 2024
1826c27
Merge pull request #850 from garylin2099/ci_dev
garylin2099 Feb 6, 2024
a672410
Merge pull request #849 from geekan/code_interpreter
geekan Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
84 changes: 84 additions & 0 deletions .github/workflows/fulltest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Full Tests

on:
workflow_dispatch:
pull_request_target:
push:
branches:
- 'main'
- 'dev'
- '*-release'
- '*-debugger'

jobs:
build:
runs-on: ubuntu-latest
environment: unittest
strategy:
matrix:
# python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9']

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
sh tests/scripts/run_install_deps.sh
- name: Run reverse proxy script for ssh service
if: contains(github.ref, '-debugger')
continue-on-error: true
env:
FPR_SERVER_ADDR: ${{ secrets.FPR_SERVER_ADDR }}
FPR_TOKEN: ${{ secrets.FPR_TOKEN }}
FPR_SSH_REMOTE_PORT: ${{ secrets.FPR_SSH_REMOTE_PORT }}
RSA_PUB: ${{ secrets.RSA_PUB }}
SSH_PORT: ${{ vars.SSH_PORT || '22'}}
run: |
echo "Run \"ssh $(whoami)@FPR_SERVER_HOST -p FPR_SSH_REMOTE_PORT\" and \"cd $(pwd)\""
mkdir -p ~/.ssh/
echo $RSA_PUB >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
wget https://github.com/fatedier/frp/releases/download/v0.32.1/frp_0.32.1_linux_amd64.tar.gz -O frp.tar.gz
tar xvzf frp.tar.gz -C /opt
mv /opt/frp* /opt/frp
/opt/frp/frpc tcp --server_addr $FPR_SERVER_ADDR --token $FPR_TOKEN --local_port $SSH_PORT --remote_port $FPR_SSH_REMOTE_PORT
- name: Test with pytest
run: |
export ALLOW_OPENAI_API_CALL=0
echo "${{ secrets.METAGPT_KEY_YAML }}" | base64 -d > config/key.yaml
mkdir -p ~/.metagpt && echo "${{ secrets.METAGPT_CONFIG2_YAML }}" | base64 -d > ~/.metagpt/config2.yaml
echo "${{ secrets.SPARK_YAML }}" | base64 -d > ~/.metagpt/spark.yaml
pytest tests/ --doctest-modules --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov --durations=20 | tee unittest.txt
- name: Show coverage report
run: |
coverage report -m
- name: Show failed tests and overall summary
run: |
grep -E "FAILED tests|ERROR tests|[0-9]+ passed," unittest.txt
failed_count=$(grep -E "FAILED|ERROR" unittest.txt | wc -l)
if [[ "$failed_count" -gt 0 ]]; then
echo "$failed_count failed lines found! Task failed."
exit 1
fi
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: |
./unittest.txt
./htmlcov/
./tests/data/rsp_cache_new.json
retention-days: 3
if: ${{ always() }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ always() }}
26 changes: 4 additions & 22 deletions .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Unit Tests

on:
workflow_dispatch:
pull_request_target:
push:
branches:
- '*-debugger'
- 'main'
- 'dev'
- '*-release'

jobs:
build:
runs-on: ubuntu-latest
environment: unittest
strategy:
matrix:
# python-version: ['3.9', '3.10', '3.11']
Expand All @@ -28,28 +28,10 @@ jobs:
- name: Install dependencies
run: |
sh tests/scripts/run_install_deps.sh
- name: Run reverse proxy script for ssh service
if: contains(github.ref, '-debugger')
continue-on-error: true
env:
FPR_SERVER_ADDR: ${{ secrets.FPR_SERVER_ADDR }}
FPR_TOKEN: ${{ secrets.FPR_TOKEN }}
FPR_SSH_REMOTE_PORT: ${{ secrets.FPR_SSH_REMOTE_PORT }}
RSA_PUB: ${{ secrets.RSA_PUB }}
SSH_PORT: ${{ vars.SSH_PORT || '22'}}
run: |
echo "Run \"ssh $(whoami)@FPR_SERVER_HOST -p FPR_SSH_REMOTE_PORT\" and \"cd $(pwd)\""
mkdir -p ~/.ssh/
echo $RSA_PUB >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
wget https://github.com/fatedier/frp/releases/download/v0.32.1/frp_0.32.1_linux_amd64.tar.gz -O frp.tar.gz
tar xvzf frp.tar.gz -C /opt
mv /opt/frp* /opt/frp
/opt/frp/frpc tcp --server_addr $FPR_SERVER_ADDR --token $FPR_TOKEN --local_port $SSH_PORT --remote_port $FPR_SSH_REMOTE_PORT
- name: Test with pytest
run: |
export ALLOW_OPENAI_API_CALL=0
echo "${{ secrets.METAGPT_KEY_YAML }}" | base64 -d > config/key.yaml
mkdir -p ~/.metagpt && cp tests/config2.yaml ~/.metagpt/config2.yaml && cp tests/spark.yaml ~/.metagpt/spark.yaml
pytest tests/ --doctest-modules --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov --durations=20 | tee unittest.txt
- name: Show coverage report
run: |
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ tests/metagpt/utils/file_repo_git
*.png
htmlcov
htmlcov.*
cov.xml
*.dot
*.pkl
*.faiss
*-structure.csv
*-structure.json

metagpt/tools/schemas
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt update &&\

# Install Mermaid CLI globally
ENV CHROME_BIN="/usr/bin/chromium" \
PUPPETEER_CONFIG="/app/metagpt/config/puppeteer-config.json"\
puppeteer_config="/app/metagpt/config/puppeteer-config.json"\
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
RUN npm install -g @mermaid-js/mermaid-cli &&\
npm cache clean --force
Expand Down
47 changes: 19 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,21 @@

### Pip installation

> Ensure that Python 3.9+ is installed on your system. You can check this by using: `python --version`.
> You can use conda like this: `conda create -n metagpt python=3.9 && conda activate metagpt`

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

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

# Step 3: setup your OPENAI_API_KEY, or make sure it existed in the env
mkdir ~/.metagpt
cp config/config.yaml ~/.metagpt/config.yaml
vim ~/.metagpt/config.yaml

# Step 4: run metagpt cli
metagpt "Create a 2048 game in python"

# Step 5 [Optional]: If you want to save the artifacts like diagrams such as quadrant chart, system designs, sequence flow in the workspace, you can execute the step before Step 3. By default, the framework is compatible, and the entire process can be run completely without executing this step.
# If executing, ensure that NPM is installed on your system. Then install mermaid-js. (If you don't have npm in your computer, please go to the Node.js official website to install Node.js https://nodejs.org/ and then you will have npm tool in your computer.)
npm --version
sudo npm install -g @mermaid-js/mermaid-cli
pip install metagpt
metagpt --init-config # create ~/.metagpt/config2.yaml, modify it to your own config
metagpt "Create a 2048 game" # this will create a repo in ./workspace
```

or you can use it as library

```python
from metagpt.software_company import generate_repo, ProjectRepo
repo: ProjectRepo = generate_repo("Create a 2048 game") # or ProjectRepo("<path>")
print(repo) # it will print the repo structure with files
```

detail installation please refer to [cli_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-stable-version)
Expand All @@ -87,19 +78,19 @@ detail installation please refer to [cli_install](https://docs.deepwisdom.ai/mai
> Note: In the Windows, you need to replace "/opt/metagpt" with a directory that Docker has permission to create, such as "D:\Users\x\metagpt"

```bash
# Step 1: Download metagpt official image and prepare config.yaml
# Step 1: Download metagpt official image and prepare config2.yaml
docker pull metagpt/metagpt:latest
mkdir -p /opt/metagpt/{config,workspace}
docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config.yaml > /opt/metagpt/config/key.yaml
vim /opt/metagpt/config/key.yaml # Change the config
docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config2.yaml > /opt/metagpt/config/config2.yaml
vim /opt/metagpt/config/config2.yaml # Change the config

# Step 2: Run metagpt demo with container
docker run --rm \
--privileged \
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/config/config2.yaml:/app/metagpt/config/config2.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
metagpt "Write a cli snake game"
metagpt "Create a 2048 game"
```

detail installation please refer to [docker_install](https://docs.deepwisdom.ai/main/en/guide/get_started/installation.html#install-with-docker)
Expand Down
145 changes: 0 additions & 145 deletions config/config.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions config/config2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
llm:
api_key: "YOUR_API_KEY"
model: "gpt-4-turbo-preview" # or gpt-3.5-turbo-1106 / gpt-4-1106-preview
Loading
Loading