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

Fix for issue #1252: _achat_completion_stream method #1271

Closed
wants to merge 439 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
439 commits
Select commit Hold shift + click to select a range
186d617
move stanford_town folder
better629 Mar 28, 2024
998cc57
update ut
better629 Mar 28, 2024
5d839a8
pypi with non-py files
better629 Mar 28, 2024
f1bc890
update readme
better629 Mar 28, 2024
e5cd832
Merge branch 'feat_st_game' of github.com:better629/MetaGPT into feat…
better629 Mar 28, 2024
ba7eba4
Update Readme & Add Readme_CN
didiforgithub Mar 28, 2024
1126674
update st_game using MG v0.7
better629 Feb 26, 2024
84d3795
add temp_storage_path
better629 Mar 4, 2024
6c2ee5c
update
better629 Mar 4, 2024
cfd1289
update
better629 Mar 4, 2024
6dc752e
update field definition of scratch
better629 Mar 4, 2024
9caa88e
rm act_event validation
better629 Mar 4, 2024
e240c0d
update
better629 Mar 4, 2024
2b7d09e
add base environment action_space/observation space and update stanfo…
better629 Mar 26, 2024
5b74190
add inherited funcs and then implement
better629 Mar 26, 2024
bf75e32
fix Environment missing abstract methods implement
better629 Mar 26, 2024
23e9c11
rename folder
better629 Mar 27, 2024
183cd45
simplify StanfordTown import
better629 Mar 28, 2024
8c8b054
move stanford_town folder
better629 Mar 28, 2024
9da9255
update ut
better629 Mar 28, 2024
3a69981
pypi with non-py files
better629 Mar 28, 2024
db9a1c5
update readme
better629 Mar 28, 2024
9ead62b
update st_game using MG v0.7
better629 Feb 26, 2024
93cdb77
add temp_storage_path
better629 Mar 4, 2024
88474fd
update
better629 Mar 4, 2024
cc9d8e9
update
better629 Mar 4, 2024
59db59e
update field definition of scratch
better629 Mar 4, 2024
9d702f2
rm act_event validation
better629 Mar 4, 2024
6637312
update
better629 Mar 4, 2024
9a8627f
add base environment action_space/observation space and update stanfo…
better629 Mar 26, 2024
7ca51b7
rename folder
better629 Mar 27, 2024
24b76f8
simplify StanfordTown import
better629 Mar 28, 2024
8537850
move stanford_town folder
better629 Mar 28, 2024
205b98e
fix conflict
better629 Mar 28, 2024
29515e9
fix format
better629 Mar 28, 2024
5180980
Merge pull request #1113 from better629/feat_st_game
geekan Mar 28, 2024
cbb2e66
add android_env obs/action space
better629 Mar 27, 2024
39d2f37
init environment
better629 Jan 22, 2024
72fc85f
update android_ext_env
better629 Jan 23, 2024
2289763
update stanford_town_ext_env
better629 Jan 23, 2024
ff6f27f
update env
better629 Jan 23, 2024
724d81d
update mincraft_env
better629 Jan 24, 2024
81a5178
update werewolf_env
better629 Jan 24, 2024
fe0d27d
add examples/andriod_assistant framework
better629 Jan 25, 2024
471871b
add gpt4-v
better629 Jan 26, 2024
295571f
update gpt4-v
better629 Jan 26, 2024
8a49292
add andriod_assistant action self-learn / self-learn-reflect / screen…
better629 Jan 26, 2024
7f64fbe
update andriod_assistant
better629 Jan 26, 2024
a7a84e4
update orient
better629 Jan 27, 2024
42425ef
Add manual_record module & ActionOp.STOP
didiforgithub Jan 27, 2024
0343db3
update andriod_assistant
better629 Jan 28, 2024
73381f0
update andriod_assistant
better629 Jan 28, 2024
bf7ade0
add andriod_assistant action_output and update ui_document
better629 Jan 29, 2024
3659bfc
Adds parse_record & parse_record_an , add RecordLogItem & modify Acti…
didiforgithub Jan 29, 2024
c2d959c
update task_dir/docs_dir
better629 Jan 29, 2024
1947443
Create test.py
didiforgithub Jan 29, 2024
4893acb
add residue code
better629 Jan 30, 2024
7e3a7bd
Adds New Manual demo & docs in apps folder; Adds Storage folder as re…
didiforgithub Jan 30, 2024
058c79a
Update Manual Test
didiforgithub Jan 30, 2024
fb82be4
update docs parent path
better629 Jan 31, 2024
7610fa2
fix format
better629 Jan 31, 2024
5572ace
Update test for action node & Modify extenv (self reflection)
didiforgithub Feb 5, 2024
5122266
Update AppAgent's self_learn_and_self_reflect's test
didiforgithub Feb 22, 2024
ea2b749
Update mannual record action node
didiforgithub Feb 23, 2024
1397597
Update Parse Record Action Node & Modify Self Reflect Action node; Ad…
didiforgithub Feb 24, 2024
26bbdef
UPdate ScreenShot Parse Action Node;Adds 4 action nodes test to test_…
didiforgithub Feb 25, 2024
ba2fdb2
Update env & test code
didiforgithub Feb 28, 2024
c958864
Update Role Test
didiforgithub Feb 28, 2024
ac73418
delete
didiforgithub Feb 28, 2024
3522149
Update android_assistant.py
didiforgithub Feb 29, 2024
3b6a78c
update watch action
better629 Mar 4, 2024
0f0f41f
Update README.md
didiforgithub Mar 4, 2024
732cf36
FIx Format and Some bugs in android_assistant.py
didiforgithub Mar 4, 2024
d75c1b3
fix merge problem
better629 Mar 27, 2024
64271fd
fix merge problem
better629 Mar 27, 2024
cdb4d48
del useless files
better629 Mar 27, 2024
53d0b70
update andriod_assistant with obs/action space
better629 Mar 27, 2024
93acfd5
update andriod_assistant const and test data
better629 Mar 27, 2024
9604dec
rename tests
better629 Mar 27, 2024
c1308f9
update android_env to simplify code
better629 Mar 27, 2024
32d07ee
update log format
better629 Mar 27, 2024
257553d
fix
better629 Mar 27, 2024
9435f11
update
better629 Mar 27, 2024
0a11b4a
fix typo
better629 Mar 28, 2024
eb190f7
update path exist judgement
better629 Mar 28, 2024
ec65d8d
Update Readme & Add Readme_CN
didiforgithub Mar 28, 2024
f9d64d4
fix conflict
better629 Mar 28, 2024
b9ec0e9
del xx_env
better629 Mar 28, 2024
7652880
del xx_env
better629 Mar 28, 2024
48348a3
mv android_assistant folder and fix conflicts
better629 Mar 28, 2024
a0efe97
fix problem due to solve conflicts
better629 Mar 28, 2024
e3e49ee
fix path problem
better629 Mar 28, 2024
a9ec18a
udpate android assistant
better629 Mar 29, 2024
91db2e3
update
better629 Mar 29, 2024
52e709c
update config2
better629 Mar 29, 2024
5df1c9f
Update Readme V0.2
didiforgithub Mar 29, 2024
7cfe2ef
bugfix: fix release trigger problem
voidking Mar 29, 2024
6e3c16a
Merge pull request #1136 from voidking/pr
garylin2099 Mar 29, 2024
51d52e5
fix cv2.imshow() bug in manual parse action; update readme & readme_C…
didiforgithub Mar 29, 2024
b2ed596
fix api_version bug
collinzrj Mar 29, 2024
ae2a89c
add contributor form
geekan Mar 30, 2024
8bb0d7a
Merge branch 'v0.8-release' into v0.8
seehi Mar 30, 2024
61cbee1
Merge pull request #1140 from seehi/v0.8
garylin2099 Mar 30, 2024
5255be1
add try_except for _plan_and_act in data_interpreter.
orange-crow Mar 30, 2024
eb5ed64
fix typo mistake
wangsheng Mar 31, 2024
f5c7d72
Merge pull request #1143 from wangsheng/patch-1
geekan Mar 31, 2024
ed53e1c
Merge pull request #1141 from orange-crow/add_try_except_for_plan_and…
geekan Apr 1, 2024
d53d8f7
Merge pull request #1137 from collinzrj/werewolf_game
iorisa Apr 1, 2024
c6956fb
fixbug: dependencies
Apr 1, 2024
1653ad5
Merge pull request #1099 from iorisa/fixbug/issue/1095
geekan Apr 2, 2024
ba9e3fe
Merge pull request #1103 from iorisa/fixbug/issue/1094
geekan Apr 2, 2024
0ea6d7c
Update link
didiforgithub Apr 2, 2024
5300bca
fix missing last_act value
better629 Apr 2, 2024
4f550a7
replace config2 other with extra
better629 Apr 2, 2024
128953b
feat: add none
Apr 2, 2024
4457bf7
add entry of readme in script
better629 Apr 2, 2024
46748e3
update citation
better629 Apr 2, 2024
df11fe8
Merge pull request #1155 from iorisa/fixbug/mmdc
geekan Apr 3, 2024
9e26a40
Merge pull request #1135 from better629/feat_android
geekan Apr 4, 2024
c6766e8
Merge pull request #1124 from azurewtl/feature_mute_stream_log_for_in…
geekan Apr 5, 2024
ccbe91c
precommit
geekan Apr 5, 2024
80202e1
change default log level to info
geekan Apr 5, 2024
a959085
Merge pull request #1079 from igeni/regexp-fix
geekan Apr 5, 2024
a2484f6
fix: Fix bug for merging
2495165664 Apr 7, 2024
f646715
fix: Delete flask dependency
2495165664 Apr 8, 2024
1ff50e8
Update `zhipuai_api.py` for custom `max_tokens` and `temperature` con…
xxf1996 Apr 8, 2024
05b0f57
migrate from mg old version to new one
better629 Apr 8, 2024
f54bb15
use WerewolfEnv
better629 Apr 8, 2024
d692d9f
fix ut and missing annotation
better629 Apr 8, 2024
7a297b8
Merge pull request #1164 from xxf1996/patch-1
geekan Apr 8, 2024
db65554
Merge pull request #1118 from 2495165664/main
geekan Apr 8, 2024
6c2b238
Merge pull request #1169 from garylin2099/di_fixes
garylin2099 Apr 9, 2024
8a27b6d
use gpt-4-turbo as default
geekan Apr 10, 2024
b568b8f
update werewolf to meet WerewolfEnv
better629 Apr 10, 2024
94a04af
fix format
better629 Apr 10, 2024
c494844
make embedding configurable and add gpt-4-turbo.
seehi Apr 10, 2024
60d34f4
use gpt-4-turbo as default
geekan Apr 10, 2024
caa1300
make embedding configurable and add gpt-4-turbo.
seehi Apr 10, 2024
549cb2d
format code
seehi Apr 10, 2024
471d5be
Merge pull request #1173 from seehi/feat-format
geekan Apr 10, 2024
63ca545
Merge pull request #1172 from seehi/feat-rag-embedding
geekan Apr 10, 2024
d4a40bd
fix code
better629 Apr 10, 2024
c43a1ca
add get_embedding log
better629 Apr 10, 2024
ade46df
update log_parse_json and custom werewolf num in prompt
better629 Apr 10, 2024
835d698
rag chroma db add metadata
better629 Apr 10, 2024
5caaea2
replace werewolf experience chromadb with rag
better629 Apr 10, 2024
a466bc9
update werewolf experience and add rag retrieve
better629 Apr 10, 2024
cf2046f
Merge branch 'main' into feat_werewolf
better629 Apr 10, 2024
fe0e628
update player profile with const
better629 Apr 10, 2024
2eccf80
rm useless file and update obs space
better629 Apr 10, 2024
bdfec45
Merge branch 'feat_werewolf' of github.com:better629/MetaGPT into fea…
better629 Apr 10, 2024
4c16d4a
Merge pull request #1175 from better629/feat_werewolf
geekan Apr 11, 2024
0a8c58f
fix start_game miss prepare_human_player
better629 Apr 11, 2024
7cfd027
Merge pull request #1180 from better629/feat_werewolf
geekan Apr 11, 2024
f87387d
Merge branch 'main' into code_interpreter
garylin2099 Apr 11, 2024
bf77d2a
Merge pull request #1182 from garylin2099/code_interpreter
garylin2099 Apr 11, 2024
4135ac8
Merge pull request #1183 from geekan/code_interpreter
geekan Apr 11, 2024
ec88e63
fix test_an ut failed without simulator
better629 Apr 11, 2024
aa715fc
Merge pull request #1184 from better629/feat_werewolf
geekan Apr 11, 2024
95c2f64
Modify the test case of DEBUG_REFLECTION_EXAMPLE
wangsheng Apr 14, 2024
00f32cb
Merge pull request #1191 from wangsheng/patch-1
geekan Apr 14, 2024
5483cc6
Create dataset_info.json
YangQianli92 Apr 15, 2024
048b97a
Delete examples/rag_bm directory
YangQianli92 Apr 15, 2024
dd1d12d
Create dataset_info.json
YangQianli92 Apr 15, 2024
44eab88
Create answer.json
YangQianli92 Apr 15, 2024
e8865ab
Add files via upload
YangQianli92 Apr 15, 2024
458c588
Create answer.json
YangQianli92 Apr 15, 2024
c8d0228
Add files via upload
YangQianli92 Apr 15, 2024
dd46992
Add files via upload
YangQianli92 Apr 15, 2024
20ab429
Add files via upload
YangQianli92 Apr 15, 2024
882b75e
Create __init__.py
YangQianli92 Apr 15, 2024
6a6ec84
Add files via upload
YangQianli92 Apr 15, 2024
1b3f7fd
Add files via upload
YangQianli92 Apr 15, 2024
a0fbd57
add config docs
geekan Apr 16, 2024
a1b017a
Update base.py
YangQianli92 Apr 16, 2024
5460ca8
Merge branch 'geekan:main' into main
YangQianli92 Apr 16, 2024
22b5611
Add files via upload
YangQianli92 Apr 16, 2024
211ba3d
Add files via upload
YangQianli92 Apr 16, 2024
2e3a73b
Update schema.py
YangQianli92 Apr 16, 2024
4047caf
Update base.py
YangQianli92 Apr 16, 2024
23ab5ae
Update __init__.py
YangQianli92 Apr 16, 2024
081c1b4
Update rag_bm.py
YangQianli92 Apr 16, 2024
52a062d
Update rag_bm.py
YangQianli92 Apr 16, 2024
fdc758a
add openrouter support
better629 Apr 16, 2024
933d6c1
Merge pull request #1200 from better629/main
geekan Apr 16, 2024
b93e677
Add files via upload
YangQianli92 Apr 17, 2024
bcc6691
Update base.py
YangQianli92 Apr 17, 2024
e60468f
Update ranker.py
YangQianli92 Apr 17, 2024
42791af
Add files via upload
YangQianli92 Apr 17, 2024
b05663b
Add files via upload
YangQianli92 Apr 17, 2024
ac31e67
Delete examples/base.py
YangQianli92 Apr 17, 2024
9350fd9
Update rag_bm.py
YangQianli92 Apr 17, 2024
2fa4cb9
Update base.py
YangQianli92 Apr 17, 2024
6eab869
Update base.py
YangQianli92 Apr 17, 2024
5e1d2b1
Update rag_bm.py
YangQianli92 Apr 17, 2024
766b1bd
Merge branch 'geekan:main' into main
YangQianli92 Apr 17, 2024
7d77dbb
Update const.py
YangQianli92 Apr 17, 2024
e17a709
Update base.py
YangQianli92 Apr 17, 2024
2a90da8
Update base.py
YangQianli92 Apr 17, 2024
4bf9cfa
Update rag_bm.py
YangQianli92 Apr 17, 2024
d0b00e3
Update rag_bm.py
YangQianli92 Apr 17, 2024
b892a9b
fixbug: vscode, FileNotFoundError: [Errno 2] No such file or director…
Apr 17, 2024
5efce3a
Add files via upload
YangQianli92 Apr 18, 2024
26112dd
Add files via upload
YangQianli92 Apr 18, 2024
d5d4511
Add files via upload
YangQianli92 Apr 18, 2024
4777fea
Add files via upload
YangQianli92 Apr 18, 2024
c094851
Add files via upload
YangQianli92 Apr 18, 2024
15d8a88
Add files via upload
YangQianli92 Apr 18, 2024
aa68e90
Delete metagpt/rag/rankers/ranker.py
YangQianli92 Apr 18, 2024
60dd3b0
Add files via upload
YangQianli92 Apr 18, 2024
1ca9bd8
fixbug: action return None
Apr 18, 2024
f2ec678
Merge pull request #1209 from iorisa/fixbug/rsp_none
geekan Apr 18, 2024
eeb063a
Merge pull request #1206 from iorisa/fixbug/vscode
geekan Apr 18, 2024
2b02492
add config examples for gpt/claude/gemini/llama3/wizardlm2
geekan Apr 20, 2024
9ede1fb
add config examples for gpt/claude/gemini/llama3/wizardlm2
geekan Apr 20, 2024
ed1b310
add config examples for groq
geekan Apr 20, 2024
83f1594
fix bug for devcontainer; it should use metagpt/metagpt:latest
OopsYouDiedE Apr 20, 2024
e212e7b
update token cost etc.
geekan Apr 21, 2024
cc0412b
rename example file and add more logs. add ping.py
geekan Apr 22, 2024
4904c13
fix code
geekan Apr 22, 2024
9cb7111
Merge pull request #1215 from geekan/test_cr
geekan Apr 22, 2024
94db06f
Merge pull request #1212 from OopsYouDiedE/main
geekan Apr 22, 2024
00649fc
fix conf example
geekan Apr 22, 2024
11ff430
bug fix
geekan Apr 22, 2024
7e285fd
update version
geekan Apr 22, 2024
dfbdeab
update openai model version
geekan Apr 22, 2024
9a7c195
update openai model version
geekan Apr 22, 2024
f3241fc
add more instruction to make use of llama3
geekan Apr 22, 2024
7bfe2b5
Merge pull request #1217 from geekan/update_model_version
geekan Apr 22, 2024
57085fb
update README
geekan Apr 22, 2024
6d60c9e
config example update
geekan Apr 23, 2024
44e0961
update requirements.txt
seehi Apr 23, 2024
a2fb6f8
update requirements.txt
seehi Apr 23, 2024
263d799
fix redundant embedding
seehi Apr 23, 2024
95011ab
Update dataset_info.json
YangQianli92 Apr 24, 2024
d0614f1
Update dataset_info.json
YangQianli92 Apr 24, 2024
51c7c8f
Create answer.json
YangQianli92 Apr 24, 2024
debe6b0
Add files via upload
YangQianli92 Apr 24, 2024
e976ece
fix redundant embedding
seehi Apr 24, 2024
b8b1a66
fix redundant embedding
seehi Apr 24, 2024
eb564bb
fix redundant embedding
seehi Apr 24, 2024
12a7825
Merge pull request #1221 from seehi/feat-update-req
geekan Apr 24, 2024
1607228
update comment
seehi Apr 24, 2024
c779f69
Merge pull request #1224 from seehi/fix-rag-redundant-embedding
geekan Apr 24, 2024
9e4e32e
Merge branch 'geekan:main' into main
YangQianli92 Apr 24, 2024
2476672
Merge pull request #1193 from YangQianli92/main
geekan Apr 25, 2024
95e6560
update crlf
geekan Apr 25, 2024
a1e8018
Update base.py
YangQianli92 Apr 26, 2024
f201b2f
Merge pull request #1228 from YangQianli92/main
geekan Apr 26, 2024
50e492d
Fix issue with _achat_completion_stream method
garylin2099 May 14, 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
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.11",
"image": "metagpt/metagpt:latest",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand All @@ -18,7 +18,7 @@
]
}
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./.devcontainer/postCreateCommand.sh"

Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/show_me_the_bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ assignees: ''
- LLM type and model name:
- System version:
- Python version:
- MetaGPT version or branch:

<!-- 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`) -->

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-package.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build and upload python package

on:
workflow_dispatch:
release:
types: [created]
types: [created, published]

jobs:
deploy:
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-include metagpt/ext/stanford_town/prompts *.txt
recursive-include metagpt/ext/stanford_town/static_dirs *.csv
recursive-include metagpt/ext/stanford_town/static_dirs *.json
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ You can configure `~/.metagpt/config2.yaml` according to the [example](https://g

```yaml
llm:
api_type: "openai" # or azure / ollama / open_llm etc. Check LLMType for more options
model: "gpt-4-turbo-preview" # or gpt-3.5-turbo-1106 / gpt-4-1106-preview
api_type: "openai" # or azure / ollama / groq etc. Check LLMType for more options
model: "gpt-4-turbo" # or gpt-3.5-turbo
base_url: "https://api.openai.com/v1" # or forward url / other llm url
api_key: "YOUR_API_KEY"
```
Expand All @@ -107,7 +107,7 @@ repo: ProjectRepo = generate_repo("Create a 2048 game") # or ProjectRepo("<path
print(repo) # it will print the repo structure with files
```

You can also use its [Data Interpreter](https://github.com/geekan/MetaGPT/tree/main/examples/di)
You can also use [Data Interpreter](https://github.com/geekan/MetaGPT/tree/main/examples/di) to write code:

```python
import asyncio
Expand Down Expand Up @@ -147,10 +147,13 @@ https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace

## Support

### Discard Join US
📢 Join Our [Discord Channel](https://discord.gg/ZRHeExS6xv)!
### Discord Join US

Looking forward to seeing you there! 🎉
📢 Join Our [Discord Channel](https://discord.gg/ZRHeExS6xv)! Looking forward to seeing you there! 🎉

### Contributor form

📝 [Fill out the form](https://airtable.com/appInfdG0eJ9J4NNL/pagK3Fh1sGclBvVkV/form) to become a contributor. We are looking forward to your participation!

### Contact Information

Expand Down
24 changes: 15 additions & 9 deletions config/config2.example.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
llm:
api_type: "openai" # or azure / ollama / open_llm etc. Check LLMType for more options
api_type: "openai" # or azure / ollama / groq etc.
base_url: "YOUR_BASE_URL"
api_key: "YOUR_API_KEY"
model: "gpt-4-turbo-preview" # or gpt-3.5-turbo-1106 / gpt-4-1106-preview
model: "gpt-4-turbo" # or gpt-3.5-turbo
proxy: "YOUR_PROXY" # for LLM API requests
# timeout: 600 # Optional. If set to 0, default value is 300.
pricing_plan: "" # Optional. If invalid, it will be automatically filled in with the value of the `model`.
# Azure-exclusive pricing plan mappings:
# - gpt-3.5-turbo 4k: "gpt-3.5-turbo-1106"
# - gpt-4-turbo: "gpt-4-turbo-preview"
# - gpt-4-turbo-vision: "gpt-4-vision-preview"
# - gpt-4 8k: "gpt-4"
# See for more: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
# Details: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
pricing_plan: "" # Optional. Use for Azure LLM when its model name is not the same as OpenAI's


# RAG Embedding.
# 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.
embedding:
api_type: "" # openai / azure / gemini / ollama etc. Check EmbeddingType for more options.
base_url: ""
api_key: ""
model: ""
api_version: ""
embed_batch_size: 100

repair_llm_output: true # when the output is not a valid json, try to repair it

Expand Down
5 changes: 3 additions & 2 deletions config/config2.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Full Example: https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml
# Reflected Code: https://github.com/geekan/MetaGPT/blob/main/metagpt/config2.py
# Config Docs: https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html
llm:
api_type: "openai" # or azure / ollama / open_llm etc. Check LLMType for more options
model: "gpt-4-turbo-preview" # or gpt-3.5-turbo-1106 / gpt-4-1106-preview
api_type: "openai" # or azure / ollama / groq etc.
model: "gpt-4-turbo" # or gpt-3.5-turbo
base_url: "https://api.openai.com/v1" # or forward url / other llm url
api_key: "YOUR_API_KEY"
5 changes: 5 additions & 0 deletions config/examples/anthropic-claude-3-opus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
llm:
api_type: 'claude' # or anthropic
base_url: 'https://api.anthropic.com'
api_key: 'YOUR_API_KEY'
model: 'claude-3-opus-20240229'
4 changes: 4 additions & 0 deletions config/examples/google-gemini.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
llm:
api_type: 'gemini'
api_key: 'YOUR_API_KEY'
model: 'gemini-pro'
5 changes: 5 additions & 0 deletions config/examples/groq-llama3-70b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
llm:
# Visit https://console.groq.com/keys to create api key
base_url: "https://api.groq.com/openai/v1"
api_key: "YOUR_API_KEY"
model: "llama3-70b-8192" # llama3-8b-8192,llama3-70b-8192,llama2-70b-4096 ,mixtral-8x7b-32768,gemma-7b-it
5 changes: 5 additions & 0 deletions config/examples/openai-gpt-3.5-turbo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
llm:
api_key: "YOUR_API_KEY"
model: "gpt-3.5-turbo"
#proxy: "http://<ip>:<port>"
#base_url: "https://<forward_url>/v1"
6 changes: 6 additions & 0 deletions config/examples/openai-gpt-4-turbo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
llm:
api_key: "YOUR_API_KEY"
model: "gpt-4-turbo"
#proxy: "http://<ip>:<port>"
#base_url: "https://<forward_url>/v1"

5 changes: 5 additions & 0 deletions config/examples/openrouter-llama3-70b-instruct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
llm:
api_type: openrouter
base_url: "https://openrouter.ai/api/v1"
api_key: "YOUR_API_KEY"
model: meta-llama/llama-3-70b-instruct
4 changes: 2 additions & 2 deletions docs/FAQ-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ MetaGPT Community - The position of Chief Evangelist rotates on a monthly basis.
### FAQ

1. Code truncation/ Parsing failure:
1. Check if it's due to exceeding length. Consider using the gpt-4-turbo-preview or other long token versions.
1. Check if it's due to exceeding length. Consider using the gpt-4-turbo or other long token versions.
2. Success rate:
1. There hasn't been a quantitative analysis yet, but the success rate of code generated by gpt-4-turbo-preview is significantly higher than that of gpt-3.5-turbo.
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.
3. Support for incremental, differential updates (if you wish to continue a half-done task):
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.
4. Can existing code be loaded?
Expand Down
2 changes: 2 additions & 0 deletions examples/android_assistant/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pyshine==0.0.9
opencv-python==4.6.0.66
71 changes: 71 additions & 0 deletions examples/android_assistant/run_assistant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Desc : the entry of android assistant including learning and acting stage
# See the usage README inside `metagpt/ext/android_assistant`
# README see `metagpt/ext/android_assistant/README.md`

import asyncio
from pathlib import Path

import typer

from metagpt.config2 import config
from metagpt.environment.android.android_env import AndroidEnv
from metagpt.ext.android_assistant.roles.android_assistant import AndroidAssistant
from metagpt.team import Team

app = typer.Typer(add_completion=False, pretty_exceptions_show_locals=False)


@app.command("", help="Run a Android Assistant")
def startup(
task_desc: str = typer.Argument(help="the task description you want the android assistant to learn or act"),
n_round: int = typer.Option(default=20, help="The max round to do an app operation task."),
stage: str = typer.Option(default="learn", help="stage: learn / act"),
mode: str = typer.Option(default="auto", help="mode: auto / manual , when state=learn"),
app_name: str = typer.Option(default="demo", help="the name of app you want to run"),
investment: float = typer.Option(default=5.0, help="Dollar amount to invest in the AI company."),
refine_doc: bool = typer.Option(
default=False, help="Refine existing operation docs based on the latest observation if True."
),
min_dist: int = typer.Option(
default=30, help="The minimum distance between elements to prevent overlapping during the labeling process."
),
android_screenshot_dir: str = typer.Option(
default="/sdcard/Pictures/Screenshots",
help="The path to store screenshots on android device. Make sure it exists.",
),
android_xml_dir: str = typer.Option(
default="/sdcard",
help="The path to store xml files for determining UI elements localtion. Make sure it exists.",
),
device_id: str = typer.Option(default="emulator-5554", help="The Android device_id"),
):
config.extra = {
"stage": stage,
"mode": mode,
"app_name": app_name,
"task_desc": task_desc,
"refine_doc": refine_doc,
"min_dist": min_dist,
"android_screenshot_dir": android_screenshot_dir,
"android_xml_dir": android_xml_dir,
"device_id": device_id,
}

team = Team(
env=AndroidEnv(
device_id=device_id,
xml_dir=Path(android_xml_dir),
screenshot_dir=Path(android_screenshot_dir),
)
)

team.hire([AndroidAssistant(output_root_dir=Path(__file__).parent)])
team.invest(investment)
team.run_project(idea=task_desc)
asyncio.run(team.run(n_round=n_round))


if __name__ == "__main__":
app()
2 changes: 1 addition & 1 deletion examples/build_customized_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class SimpleWriteCode(Action):
PROMPT_TEMPLATE: str = """
Write a python function that can {instruction} and provide two runnnable test cases.
Write a python function that can {instruction} and provide two runnable test cases.
Return ```python your_code_here ``` with NO other texts,
your code:
"""
Expand Down
Loading
Loading