From 9b746153a80d2b43da2d65b56009406a728e2afc Mon Sep 17 00:00:00 2001 From: mtmahe Date: Thu, 7 Dec 2023 19:53:55 -0400 Subject: [PATCH] fix timeout issue with a pause on retry --- src/openai/_base_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openai/_base_client.py b/src/openai/_base_client.py index 2e5678e8e6..8870aadef1 100644 --- a/src/openai/_base_client.py +++ b/src/openai/_base_client.py @@ -890,6 +890,7 @@ def _request( response.raise_for_status() except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code if retries > 0 and self._should_retry(err.response): + time.sleep(10) err.response.close() return self._retry_request( options,