superdup95 commited on
Commit
468491e
1 Parent(s): 63bc79a

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 (r.headers['x-ratelimit-limit-requests']):
33
  rpm = r.headers['x-ratelimit-limit-requests']
34
  org = r.headers['openai-organization']
35
  quota = ""
 
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 "id" in result:
33
  rpm = r.headers['x-ratelimit-limit-requests']
34
  org = r.headers['openai-organization']
35
  quota = ""