diff --git a/api/handler.py b/api/handler.py index ff946f6..8102e97 100644 --- a/api/handler.py +++ b/api/handler.py @@ -62,7 +62,7 @@ async def handle(incoming_request: fastapi.Request): user = await users.user_by_api_key(received_key.split('Bearer ')[1].strip()) if not user or not user['status']['active']: - return await errors.error(418, 'Invalid or inactive NovaAI API key!', 'Create a new NovaOSS API key or reactivate your account.') + return await errors.error(401, 'Invalid or inactive NovaAI API key!', 'Try /resetkey or /credentials.') ban_reason = user['status']['ban_reason'] if ban_reason: diff --git a/api/responder.py b/api/responder.py index 318af99..fc93381 100644 --- a/api/responder.py +++ b/api/responder.py @@ -241,6 +241,7 @@ async def respond( return if (not is_stream) and server_json_response: + server_json_response['system_fingerprint'] = f'fp_' + os.urandom(5).hex() yield json.dumps(server_json_response) if incoming_request: # not called by other code, but actually a request