Skip to content

Commit e9d4211

Browse files
Update rate limit error detection criteria for Azure OpenAI API (openai#1254)
1 parent ffa9ad2 commit e9d4211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/api_request_parallel_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ async def call_api(
322322
)
323323
status_tracker.num_api_errors += 1
324324
error = response
325-
if "Rate limit" in response["error"].get("message", ""):
325+
if "rate limit" in response["error"].get("message", "").lower():
326326
status_tracker.time_of_last_rate_limit_error = time.time()
327327
status_tracker.num_rate_limit_errors += 1
328328
status_tracker.num_api_errors -= (

0 commit comments

Comments
 (0)