Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

adjust "timeout" config param into _cons_kwargs

王同贵ec4c773c8033
diff --git a/metagpt/provider/openai_api.py b/metagpt/provider/openai_api.py
index 20013edf4..b842eb54b 100644
--- a/metagpt/provider/openai_api.py
+++ b/metagpt/provider/openai_api.py
@@ -149,7 +149,6 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
async def _achat_completion_stream(self, messages: list[dict]) -> str:
response = await openai.ChatCompletion.acreate(
**self._cons_kwargs(messages),
- timeout=3,
stream=True
)
@@ -189,6 +188,7 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
"stop": None,
"temperature": 0.3
}
+ kwargs["timeout"] = 3
return kwargs
async def _achat_completion(self, messages: list[dict]) -> dict: