JarvisChan630 commited on
Commit
13fd6b1
1 Parent(s): 5132d94
Files changed (1) hide show
  1. models/llms.py +2 -1
models/llms.py CHANGED
@@ -22,7 +22,8 @@ class BaseModel:
22
  self.max_retries = max_retries
23
  self.retry_delay = retry_delay
24
 
25
- @retry(stop=stop_after_attempt(3), wait=wait_fixed(1), retry=retry_if_exception_type(requests.RequestException))
 
26
  def _make_request(self, url, headers, payload):
27
 
28
  response = requests.post(url, headers=headers, data=json.dumps(payload))
 
22
  self.max_retries = max_retries
23
  self.retry_delay = retry_delay
24
 
25
+ # @retry(stop=stop_after_attempt(3), wait=wait_fixed(1), retry=retry_if_exception_type(requests.RequestException))
26
+ @retry(stop=stop_after_attempt(5), wait=wait_exponential(multiplier=1, min=2, max=10), reraise=True)
27
  def _make_request(self, url, headers, payload):
28
 
29
  response = requests.post(url, headers=headers, data=json.dumps(payload))