mirror of
https://github.com/openai/openai-cookbook
synced 2024-11-11 13:11:02 +00:00
Update rate limit error detection criteria for Azure OpenAI API (#1254)
This commit is contained in:
parent
ffa9ad20eb
commit
e9d4211e55
@ -322,7 +322,7 @@ class APIRequest:
|
||||
)
|
||||
status_tracker.num_api_errors += 1
|
||||
error = response
|
||||
if "Rate limit" in response["error"].get("message", ""):
|
||||
if "rate limit" in response["error"].get("message", "").lower():
|
||||
status_tracker.time_of_last_rate_limit_error = time.time()
|
||||
status_tracker.num_rate_limit_errors += 1
|
||||
status_tracker.num_api_errors -= (
|
||||
|
Loading…
Reference in New Issue
Block a user