superdup95 commited on
Commit
2e63831
·
verified ·
1 Parent(s): d0281fa

Update api_usage.py

Browse files
Files changed (1) hide show
  1. 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 == 401 or rq.status_code == 429:
520
- return False
521
- return True
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