Skip to content

🌟 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.py
index 170005c21..ae8c57ec5 100644
--- a/metagpt/configs/llm_config.py
+++ b/metagpt/configs/llm_config.py
@@ -100,6 +100,4 @@ class LLMConfig(YamlModel):
@classmethod
def 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__.py
index 14d5e7682..dd5b4f89d 100644
--- a/metagpt/provider/__init__.py
+++ b/metagpt/provider/__init__.py
@@ -17,6 +17,7 @@ from metagpt.provider.spark_api import SparkLLM
from metagpt.provider.qianfan_api import QianFanLLM
from metagpt.provider.dashscope_api import DashScopeLLM
from 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.py
index 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 body
return {
- "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_text
async def acompletion(self, messages: list[dict]):
+ # Amazon bedrock doesn't support async now
return self._achat_completion(messages)
async def _achat_completion(self, messages: list[dict], timeout=USE_CONFIG_TIMEOUT):
- # TODO:make it async
return self.completion(messages)
async def _achat_completion_stream(self, messages: list[dict], timeout=USE_CONFIG_TIMEOUT):
return self._chat_completion_stream(messages)
+