Spaces:
Running
Running
Update api_usage.py
Browse files- api_usage.py +3 -3
api_usage.py
CHANGED
@@ -516,9 +516,9 @@ def check_mistral_quota(key):
|
|
516 |
'max_tokens': -1
|
517 |
}
|
518 |
rq = requests.post(url, headers=headers, json=data)
|
519 |
-
if rq.status_code ==
|
520 |
-
return
|
521 |
-
return
|
522 |
except:
|
523 |
return "Error while making request."
|
524 |
|
|
|
516 |
'max_tokens': -1
|
517 |
}
|
518 |
rq = requests.post(url, headers=headers, json=data)
|
519 |
+
if rq.status_code == 422:
|
520 |
+
return True
|
521 |
+
return False
|
522 |
except:
|
523 |
return "Error while making request."
|
524 |
|