superdup95 commited on
Commit
b787119
1 Parent(s): 45382eb

Update api_usage.py

Browse files
Files changed (1) hide show
  1. api_usage.py +1 -1
api_usage.py CHANGED
@@ -29,7 +29,7 @@ def get_subscription(key):
29
  quota = ""
30
  r = requests.post(queryUrl, headers=headers, json=body_gpt4 if check_gpt4_availability() else body_turbo)
31
  result = r.json()
32
- if (result["error"]):
33
  e = result["error"]["code"]
34
  rpm = "";
35
  org = "";
 
29
  quota = ""
30
  r = requests.post(queryUrl, headers=headers, json=body_gpt4 if check_gpt4_availability() else body_turbo)
31
  result = r.json()
32
+ if (r.headers['x-ratelimit-limit-requests']):
33
  e = result["error"]["code"]
34
  rpm = "";
35
  org = "";