sasaki-saku
commited on
Update api_usage.py
Browse files- api_usage.py +2 -1
api_usage.py
CHANGED
@@ -356,7 +356,8 @@ def check_key_mistral_availability(key):
|
|
356 |
rq = requests.get(url, headers=headers)
|
357 |
if rq.status_code == 401:
|
358 |
return False
|
359 |
-
|
|
|
360 |
except:
|
361 |
return "Error while making request"
|
362 |
|
|
|
356 |
rq = requests.get(url, headers=headers)
|
357 |
if rq.status_code == 401:
|
358 |
return False
|
359 |
+
data = rq.json()
|
360 |
+
return [model['id'] for model in data['data']]
|
361 |
except:
|
362 |
return "Error while making request"
|
363 |
|