diff --git a/llm_server/routes/v1/generate.py b/llm_server/routes/v1/generate.py index 436854c..2434813 100644 --- a/llm_server/routes/v1/generate.py +++ b/llm_server/routes/v1/generate.py @@ -75,7 +75,7 @@ def generate(): else: raise Exception - log_prompt(client_ip, token, request_json_body['prompt'], backend_response, None, parameters, dict(request.headers), response if response else 0) + log_prompt(client_ip, token, request_json_body['prompt'], '', None, parameters, dict(request.headers), response if response else 0) return jsonify({ 'code': 500, 'error': 'failed to reach backend', @@ -112,7 +112,7 @@ def generate(): } else: raise Exception - log_prompt(client_ip, token, request_json_body['prompt'], backend_response, elapsed_time, parameters, dict(request.headers), response.status_code) + log_prompt(client_ip, token, request_json_body['prompt'], '', elapsed_time, parameters, dict(request.headers), response.status_code) return jsonify({ 'code': 500, 'error': 'the backend did not return valid JSON',