Skip to content

Commit

Permalink
fix bug: _achat_completion_stream add request_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
lambertd committed Aug 7, 2024
1 parent c036574 commit e4b8288
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metagpt/provider/qianfan_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def acompletion(self, messages: list[dict], timeout: int = USE_CONFIG_TIME
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:
Expand Down

0 comments on commit e4b8288

Please sign in to comment.