Commit
·
719033b
1
Parent(s):
b3872f3
Update api_usage.py
Browse files- api_usage.py +1 -9
api_usage.py
CHANGED
@@ -28,15 +28,7 @@ def get_subscription(key):
|
|
28 |
org = ""
|
29 |
quota = ""
|
30 |
try:
|
31 |
-
r = requests.post(queryUrl, headers=headers, json=body_gpt4 if check_gpt4_availability() else body_turbo)
|
32 |
-
if (r.headers['x-ratelimit-limit-requests']):
|
33 |
-
rpm = r.headers['x-ratelimit-limit-requests']
|
34 |
-
org = r.headers['openai-organization']
|
35 |
-
quota = ""
|
36 |
-
else:
|
37 |
-
rpm = ""
|
38 |
-
org = ""
|
39 |
-
quota = ""
|
40 |
except Exception as e:
|
41 |
error_message = str(e)
|
42 |
print(e)
|
|
|
28 |
org = ""
|
29 |
quota = ""
|
30 |
try:
|
31 |
+
r = requests.post(queryUrl, headers=headers, json=body_gpt4 if check_gpt4_availability() else body_turbo)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
except Exception as e:
|
33 |
error_message = str(e)
|
34 |
print(e)
|