From e4b82880d1ccb34697638ec1f27c9f9649240617 Mon Sep 17 00:00:00 2001 From: lambertd Date: Wed, 7 Aug 2024 17:42:17 +0800 Subject: [PATCH] fix bug: _achat_completion_stream add request_timeout --- metagpt/provider/qianfan_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/provider/qianfan_api.py b/metagpt/provider/qianfan_api.py index 3d78c8bfc..4fba0777c 100644 --- a/metagpt/provider/qianfan_api.py +++ b/metagpt/provider/qianfan_api.py @@ -117,7 +117,7 @@ class QianFanLLM(BaseLLM): return await self._achat_completion(messages, timeout=self.get_timeout(timeout)) async def _achat_completion_stream(self, messages: list[dict], timeout: int = USE_CONFIG_TIMEOUT) -> str: - resp = await self.aclient.ado(**self._const_kwargs(messages=messages, stream=True)) + resp = await self.aclient.ado(**self._const_kwargs(messages=messages, stream=True),request_timeout = timeout) collected_content = [] usage = {} async for chunk in resp: