From 70fcf354925aa68f9260e06c7f84dc81f4ce233c Mon Sep 17 00:00:00 2001 From: garylin2099 Date: Fri, 8 Dec 2023 15:29:11 +0800 Subject: [PATCH 1/4] openai requirement bug fix --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f0169d7fa..14a9f485d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ langchain==0.0.231 loguru==0.6.0 meilisearch==0.21.0 numpy==1.24.3 -openai>=0.28.0 +openai==0.28.0 openpyxl beautifulsoup4==4.12.2 pandas==2.0.3 From 4a9b85f268b3a0d0a01bbc7b1fc997862fe7449a Mon Sep 17 00:00:00 2001 From: garylin2099 Date: Fri, 8 Dec 2023 15:30:02 +0800 Subject: [PATCH 2/4] update version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 239156ae3..494a4614d 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ with open(path.join(here, "requirements.txt"), encoding="utf-8") as f: setup( name="metagpt", - version="0.3.0", + version="0.4.0", description="The Multi-Role Meta Programming Framework", long_description=long_description, long_description_content_type="text/markdown", From 6f1ff01e0c58c02107558bf9466e6167db05bfae Mon Sep 17 00:00:00 2001 From: garylin2099 Date: Mon, 11 Dec 2023 11:52:50 +0800 Subject: [PATCH 3/4] roadmap update as of v0.4.0 --- docs/ROADMAP.md | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 005a59ab2..afc9ff445 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -16,12 +16,12 @@ ### Tasks To reach version v0.5, approximately 70% of the following tasks need to be completed. 1. Usability - 1. Release v0.01 pip package to try to solve issues like npm installation (though not necessarily successfully) + 1. ~~Release v0.01 pip package to try to solve issues like npm installation (though not necessarily successfully)~~ (v0.3.0) 2. Support for overall save and recovery of software companies - 3. Support human confirmation and modification during the process + 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 4. Support process caching: Consider carefully whether to add server caching mechanism - 5. Resolve occasional failure to follow instruction under current prompts, causing code parsing errors, through stricter system prompts - 6. Write documentation, describing the current features and usage at all levels + 5. ~~Resolve occasional failure to follow instruction under current prompts, causing code parsing errors, through stricter system prompts~~ (v0.4.0, with function call) + 6. Write documentation, describing the current features and usage at all levels (ongoing, continuously adding contents to [documentation site](https://docs.deepwisdom.ai/guide/get_started/introduction.html)) 7. ~~Support Docker~~ 2. Features 1. Support a more standard and stable parser (need to analyze the format that the current LLM is better at) @@ -30,31 +30,33 @@ ### Tasks 4. Complete the design and implementation of module breakdown 5. Support various modes of memory: clearly distinguish between long-term and short-term memory 6. Perfect the test role, and carry out necessary interactions with humans - 7. Provide full mode instead of the current fast mode, allowing natural communication between roles - 8. Implement SkillManager and the process of incremental Skill learning + 7. Allowing natural communication between roles (expected v0.5.0) + 8. Implement SkillManager and the process of incremental Skill learning (experimentation done with game agents) 9. Automatically get RPM and configure it by calling the corresponding openai page, so that each key does not need to be manually configured + 10. IMPORTANT: Support incremental development (expected v0.5.0) 3. Strategies - 1. Support ReAct strategy - 2. Support CoT strategy + 1. Support ReAct strategy (experimentation done with game agents) + 2. Support CoT strategy (experimentation done with game agents) 3. Support ToT strategy - 4. Support Reflection strategy + 4. Support Reflection strategy (experimentation done with game agents) + 5. Support planning 4. Actions - 1. Implementation: Search + 1. ~~Implementation: Search~~ (v0.2.1) 2. Implementation: Knowledge search, supporting 10+ data formats - 3. Implementation: Data EDA + 3. Implementation: Data EDA (expected v0.6.0) 4. Implementation: Review - 5. Implementation: Add Document - 6. Implementation: Delete Document + 5. Implementation: Add Document (expected v0.5.0) + 6. Implementation: Delete Document (expected v0.5.0) 7. Implementation: Self-training - 8. Implementation: DebugError + 8. ~~Implementation: DebugError~~ (v0.2.1) 9. Implementation: Generate reliable unit tests based on YAPI 10. Implementation: Self-evaluation 11. Implementation: AI Invocation 12. Implementation: Learning and using third-party standard libraries 13. Implementation: Data collection 14. Implementation: AI training - 15. Implementation: Run code - 16. Implementation: Web access + 15. ~~Implementation: Run code~~ (v0.2.1) + 16. ~~Implementation: Web access~~ (v0.2.1) 5. Plugins: Compatibility with plugin system 6. Tools 1. ~~Support SERPER api~~ @@ -64,13 +66,13 @@ ### Tasks 1. Perfect the action pool/skill pool for each role 2. Red Book blogger 3. E-commerce seller - 4. Data analyst + 4. Data analyst (expected v0.6.0) 5. News observer - 6. Institutional researcher + 6. ~~Institutional researcher~~ (v0.2.1) 8. Evaluation - 1. Support an evaluation on a game dataset - 2. Reproduce papers, implement full skill acquisition for a single game role, achieving SOTA results - 3. Support an evaluation on a math dataset + 1. Support an evaluation on a game dataset (experimentation done with game agents) + 2. Reproduce papers, implement full skill acquisition for a single game role, achieving SOTA results (experimentation done with game agents) + 3. Support an evaluation on a math dataset (expected v0.6.0) 4. Reproduce papers, achieving SOTA results for current mathematical problem solving process 9. LLM 1. Support Claude underlying API From 9d922941cf468e89a3202ce230e20f878e22f072 Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Mon, 11 Dec 2023 22:42:13 +0800 Subject: [PATCH 4/4] add gpt-4-turbo and gpt-3-turbo-1106 in token count Signed-off-by: Yi Lin --- metagpt/utils/token_counter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/metagpt/utils/token_counter.py b/metagpt/utils/token_counter.py index 1af96f272..ba63e90a9 100644 --- a/metagpt/utils/token_counter.py +++ b/metagpt/utils/token_counter.py @@ -16,11 +16,13 @@ TOKEN_COSTS = { "gpt-3.5-turbo-0613": {"prompt": 0.0015, "completion": 0.002}, "gpt-3.5-turbo-16k": {"prompt": 0.003, "completion": 0.004}, "gpt-3.5-turbo-16k-0613": {"prompt": 0.003, "completion": 0.004}, + "gpt-3.5-turbo-1106": {"prompt": 0.001, "completion": 0.002}, "gpt-4-0314": {"prompt": 0.03, "completion": 0.06}, "gpt-4": {"prompt": 0.03, "completion": 0.06}, "gpt-4-32k": {"prompt": 0.06, "completion": 0.12}, "gpt-4-32k-0314": {"prompt": 0.06, "completion": 0.12}, "gpt-4-0613": {"prompt": 0.06, "completion": 0.12}, + "gpt-4-1106-preview": {"prompt": 0.01, "completion": 0.03}, "text-embedding-ada-002": {"prompt": 0.0004, "completion": 0.0}, "chatglm_turbo": {"prompt": 0.0, "completion": 0.00069} # 32k version, prompt + completion tokens=0.005¥/k-tokens } @@ -32,11 +34,13 @@ TOKEN_MAX = { "gpt-3.5-turbo-0613": 4096, "gpt-3.5-turbo-16k": 16384, "gpt-3.5-turbo-16k-0613": 16384, + "gpt-3.5-turbo-1106": 16384, "gpt-4-0314": 8192, "gpt-4": 8192, "gpt-4-32k": 32768, "gpt-4-32k-0314": 32768, "gpt-4-0613": 8192, + "gpt-4-1106-preview": 128000, "text-embedding-ada-002": 8192, "chatglm_turbo": 32768 } @@ -52,10 +56,12 @@ def count_message_tokens(messages, model="gpt-3.5-turbo-0613"): if model in { "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k-0613", + "gpt-3.5-turbo-1106", "gpt-4-0314", "gpt-4-32k-0314", "gpt-4-0613", "gpt-4-32k-0613", + "gpt-4-1106-preview", }: tokens_per_message = 3 tokens_per_name = 1