From d041b6290f7b7965388b13b9be407cb7da26714b Mon Sep 17 00:00:00 2001 From: yzlin Date: Wed, 3 Jan 2024 19:32:29 +0800 Subject: [PATCH 1/4] version and readme update --- README.md | 5 ++++- setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a78a6c55..9c88c92a1 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,10 @@ # MetaGPT: The Multi-Agent Framework

Software Company Multi-Role Schematic (Gradually Implementing)

## News -- Dec 15: [v0.5.0](https://github.com/geekan/MetaGPT/releases/tag/v0.5.0) is released! We introduce **incremental development**, facilitating agents to build up larger projects on top of their previous efforts or existing codebase. We also launch a whole collection of important features, including **multilingual support** (experimental), multiple **programming languages support** (experimental), **incremental development** (experimental), CLI support, pip support, enhanced code review, documentation mechanism, and optimized messaging mechanism! +🚀 Jan 03: Here comes [v0.6.0](https://github.com/geekan/MetaGPT/releases/tag/v0.6.0)! In this version, we added serialization and deserialization of important objects and enabled breakpoint recovery. We upgraded OpenAI package to v1.6.0 and supported Gemini, ZhipuAI, Ollama, OpenLLM, etc. Moreover, we provided extremely simple examples where you need only 7 lines to implement a general election [debate](https://github.com/geekan/MetaGPT/blob/main/examples/debate_simple.py). Check out more details [here](https://github.com/geekan/MetaGPT/releases/tag/v0.6.0)! + + +🚀 Dec 15: [v0.5.0](https://github.com/geekan/MetaGPT/releases/tag/v0.5.0) is released! We introduced **incremental development**, facilitating agents to build up larger projects on top of their previous efforts or existing codebase. We also launched a whole collection of important features, including **multilingual support** (experimental), multiple **programming languages support** (experimental), **incremental development** (experimental), CLI support, pip support, enhanced code review, documentation mechanism, and optimized messaging mechanism! ## Install diff --git a/setup.py b/setup.py index a81be6115..ae0b0d8aa 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ extras_require["dev"] = (["pylint~=3.0.3", "black~=23.3.0", "isort~=5.12.0", "pr setup( name="metagpt", - version="0.5.2", + version="0.6.0", description="The Multi-Agent Framework", long_description=long_description, long_description_content_type="text/markdown", From 7bb7e37fd3a1d9ed2ee89dd93ccc5694bd64e640 Mon Sep 17 00:00:00 2001 From: shenchucheng <60704484+shenchucheng@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:53:49 +0800 Subject: [PATCH 2/4] Update requirements.txt --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9c90034cb..0a54236f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ pandas==2.0.3 pydantic==2.5.3 #pygame==2.1.3 #pymilvus==2.2.8 -pytest==7.2.2 +# pytest==7.2.2 # test extras require python_docx==0.8.11 PyYAML==6.0.1 # sentence_transformers==2.2.2 @@ -38,7 +38,7 @@ typing-inspect==0.8.0 typing_extensions==4.9.0 libcst==1.0.1 qdrant-client==1.7.0 -pytest-mock==3.11.1 +# pytest-mock==3.11.1 # test extras require # open-interpreter==0.1.7; python_version>"3.9" # Conflict with openai 1.x ta==0.10.2 semantic-kernel==0.4.3.dev0 @@ -57,5 +57,5 @@ gitignore-parser==0.1.9 websockets~=12.0 networkx~=3.2.1 google-generativeai==0.3.2 -playwright==1.40.0 +# playwright==1.40.0 # playwright extras require anytree From d05193332418f0a0c2ab06e7c6f8d20496f29de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Thu, 4 Jan 2024 12:46:41 +0800 Subject: [PATCH 3/4] fixbug: recursive search for provider --- config/config.yaml | 1 + metagpt/config.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/config.yaml b/config/config.yaml index 5025a4977..e5f8f4573 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -16,6 +16,7 @@ MAX_TOKENS: 4096 RPM: 10 LLM_TYPE: OpenAI # Except for these three major models – OpenAI, MetaGPT LLM, and Azure – other large models can be distinguished based on the validity of the key. TIMEOUT: 60 # Timeout for llm invocation +DEFAULT_PROVIDER: openai #### if Spark #SPARK_APPID : "YOUR_APPID" diff --git a/metagpt/config.py b/metagpt/config.py index eb3636c9a..d633c7d28 100644 --- a/metagpt/config.py +++ b/metagpt/config.py @@ -50,6 +50,9 @@ class LLMProviderEnum(Enum): AZURE_OPENAI = "azure_openai" OLLAMA = "ollama" + def __missing__(self, key): + return self.OPENAI + class Config(metaclass=Singleton): """ @@ -108,6 +111,11 @@ class Config(metaclass=Singleton): if v: provider = k break + if provider is None: + if self.DEFAULT_PROVIDER: + provider = LLMProviderEnum(self.DEFAULT_PROVIDER) + else: + raise NotConfiguredException("You should config a LLM configuration first") if provider is LLMProviderEnum.GEMINI and not require_python_version(req_version=(3, 10)): warnings.warn("Use Gemini requires Python >= 3.10") @@ -117,7 +125,6 @@ class Config(metaclass=Singleton): if provider: logger.info(f"API: {provider}") return provider - raise NotConfiguredException("You should config a LLM configuration first") def get_model_name(self, provider=None) -> str: provider = provider or self.get_default_llm_provider_enum() From 039fa84ce46aec2c743e6d802c806efe398a97c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Thu, 4 Jan 2024 13:32:45 +0800 Subject: [PATCH 4/4] fixbug: recursive search for provider --- config/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.yaml b/config/config.yaml index e5f8f4573..28a312a9e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -16,7 +16,7 @@ MAX_TOKENS: 4096 RPM: 10 LLM_TYPE: OpenAI # Except for these three major models – OpenAI, MetaGPT LLM, and Azure – other large models can be distinguished based on the validity of the key. TIMEOUT: 60 # Timeout for llm invocation -DEFAULT_PROVIDER: openai +#DEFAULT_PROVIDER: openai #### if Spark #SPARK_APPID : "YOUR_APPID"