Skip to content

Commit

Permalink
Update rate limit error detection criteria for Azure OpenAI API (#1254)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingjian-zhang authored Jul 7, 2024
1 parent ffa9ad2 commit e9d4211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/api_request_parallel_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ async def call_api(
)
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 -= (
Expand Down

0 comments on commit e9d4211

Please sign in to comment.