Compare commits

..

5 commits

Author SHA1 Message Date
Game_Time 8fe14135fd
Merge branch 'NovaOSS:main' into main 2023-08-20 06:54:14 +05:00
Game_Time 0877645981
Update tests.yml 2023-08-20 06:53:57 +05:00
Game_Time 7ccd93c423
Merge branch 'NovaOSS:main' into main 2023-08-20 06:49:20 +05:00
nsde ce2cd9469e Quicker models endpoint 2023-08-19 17:53:48 +02:00
nsde 474723c6dd Added gpt-4-32k support 2023-08-19 17:47:57 +02:00
3 changed files with 1711 additions and 1352 deletions

View file

@ -16,7 +16,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.x python-version: 3.10
- name: Install dependencies - name: Install dependencies
run: | run: |

File diff suppressed because it is too large Load diff

View file

@ -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']