mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 18:33:57 +01:00
Merge branch 'NovaOSS:main' into main
This commit is contained in:
commit
7ccd93c423
3054
api/models.json
3054
api/models.json
File diff suppressed because it is too large
Load diff
|
@ -28,6 +28,9 @@ async def handle(incoming_request):
|
||||||
users = UserManager()
|
users = UserManager()
|
||||||
path = incoming_request.url.path.replace('v1/v1/', 'v1/')
|
path = incoming_request.url.path.replace('v1/v1/', 'v1/')
|
||||||
|
|
||||||
|
if '/models' in path:
|
||||||
|
return fastapi.responses.JSONResponse(content=models_list)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
payload = await incoming_request.json()
|
payload = await incoming_request.json()
|
||||||
except json.decoder.JSONDecodeError:
|
except json.decoder.JSONDecodeError:
|
||||||
|
@ -52,10 +55,6 @@ async def handle(incoming_request):
|
||||||
if ban_reason:
|
if ban_reason:
|
||||||
return await errors.error(403, f'Your NovaAI account has been banned. Reason: "{ban_reason}".', 'Contact the staff for an appeal.')
|
return await errors.error(403, f'Your NovaAI account has been banned. Reason: "{ban_reason}".', 'Contact the staff for an appeal.')
|
||||||
|
|
||||||
path_contains_models = '/models' in path
|
|
||||||
if path_contains_models:
|
|
||||||
return fastapi.responses.JSONResponse(content=models_list)
|
|
||||||
|
|
||||||
costs = config['costs']
|
costs = config['costs']
|
||||||
cost = costs['other']
|
cost = costs['other']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue