Rafal commited on
Commit
a4cea1f
·
1 Parent(s): 2a7e3b8

Updated OpenAI error to handle new version of OpenAI

Browse files
Files changed (1) hide show
  1. openAI_manager.py +3 -3
openAI_manager.py CHANGED
@@ -48,9 +48,9 @@ Other attribute terms in this context are: {att_terms_str}. Use them for interpr
48
  #print(f"Instruction: {instruction}")
49
 
50
  # https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb
51
- @backoff.on_exception(backoff.expo, (openai.error.RateLimitError,
52
- openai.error.APIError,
53
- openai.error.ServiceUnavailableError,
54
  ConnectionResetError,
55
  json.decoder.JSONDecodeError))#,
56
  #max_time=300,
 
48
  #print(f"Instruction: {instruction}")
49
 
50
  # https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb
51
+ @backoff.on_exception(backoff.expo, (openai.RateLimitError,
52
+ openai.APIError,
53
+ openai.ServiceUnavailableError,
54
  ConnectionResetError,
55
  json.decoder.JSONDecodeError))#,
56
  #max_time=300,