diff --git a/llm_server/routes/v1/generate.py b/llm_server/routes/v1/generate.py index fe38426..0193847 100644 --- a/llm_server/routes/v1/generate.py +++ b/llm_server/routes/v1/generate.py @@ -149,17 +149,14 @@ def generate(): }), 200 else: - if opts.mode == 'oobabooga': - backend_response = format_sillytavern_err(f'The backend did not return valid JSON.', 'error') - response_json_body = { - 'results': [ - { - 'text': backend_response, - } - ], - } - else: - raise Exception + backend_response = format_sillytavern_err(f'The backend did not return valid JSON.', 'error') + response_json_body = { + 'results': [ + { + 'text': backend_response, + } + ], + } log_prompt(client_ip, token, request_json_body['prompt'], backend_response, elapsed_time, parameters, dict(request.headers), response.status_code, is_error=True) return jsonify({ 'code': 500,