diff --git a/openai/api_requestor.py b/openai/api_requestor.py index a6565c0351..504f7c4411 100644 --- a/openai/api_requestor.py +++ b/openai/api_requestor.py @@ -720,6 +720,8 @@ async def _interpret_async_response( else: try: await result.read() + except (aiohttp.ServerTimeoutError, asyncio.TimeoutError) as e: + raise error.Timeout("Request timed out") from e except aiohttp.ClientError as e: util.log_warn(e, body=result.content) return (