Merge pull request #1442 from duanguo108/v0.8-release

fix bug:  qianfan_api.py _achat_completion_stream add request_timeout
This commit is contained in:
Alexander Wu 2024-10-11 17:28:40 +08:00 committed by GitHub
commit 05e7cbfba6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: