🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
update provider package
usamimeri_renko6452adf82aa1
diff --git a/metagpt/configs/llm_config.py b/metagpt/configs/llm_config.pyindex 170005c21..ae8c57ec5 100644--- a/metagpt/configs/llm_config.py+++ b/metagpt/configs/llm_config.py@@ -100,6 +100,4 @@ class LLMConfig(YamlModel):@classmethoddef check_timeout(cls, v):return v or LLM_API_TIMEOUT-- def get(self, key: str, default = None):- return getattr(self, key, default)+diff --git a/metagpt/provider/__init__.py b/metagpt/provider/__init__.pyindex 14d5e7682..dd5b4f89d 100644--- a/metagpt/provider/__init__.py+++ b/metagpt/provider/__init__.py@@ -17,6 +17,7 @@ from metagpt.provider.spark_api import SparkLLMfrom metagpt.provider.qianfan_api import QianFanLLMfrom metagpt.provider.dashscope_api import DashScopeLLMfrom metagpt.provider.anthropic_api import AnthropicLLM+from metagpt.provider.bedrock.amazon_bedrock_api import AmazonBedrockLLM__all__ = ["GeminiLLM",@@ -30,4 +31,5 @@ __all__ = ["QianFanLLM","DashScopeLLM","AnthropicLLM",+ "AmazonBedrockLLM"]diff --git a/metagpt/provider/bedrock/amazon_bedrock_api.py b/metagpt/provider/bedrock/amazon_bedrock_api.pyindex 2a72de019..7262a11be 100644--- a/metagpt/provider/bedrock/amazon_bedrock_api.py+++ b/metagpt/provider/bedrock/amazon_bedrock_api.py@@ -39,7 +39,7 @@ class AmazonBedrockLLM(BaseLLM):def _generate_kwargs(self) -> dict:# for now only use temperature due to the difference of request bodyreturn {- "temperature": self.config.get("temperature", 0.1),+ "temperature": self.config.temperature}def completion(self, messages: list[dict]) -> str:@@ -74,11 +74,12 @@ class AmazonBedrockLLM(BaseLLM):return full_textasync def acompletion(self, messages: list[dict]):+ # Amazon bedrock doesn't support async nowreturn self._achat_completion(messages)async def _achat_completion(self, messages: list[dict], timeout=USE_CONFIG_TIMEOUT):- # TODO:make it asyncreturn self.completion(messages)async def _achat_completion_stream(self, messages: list[dict], timeout=USE_CONFIG_TIMEOUT):return self._chat_completion_stream(messages)+