forgot to remove a snippet

This commit is contained in:
Cyberes 2023-08-29 14:53:03 -06:00
parent 23f3fcf579
commit 06b52c7648
1 changed files with 2 additions and 1 deletions

View File

@ -78,6 +78,7 @@ def generate():
end_time = time.time()
elapsed_time = end_time - start_time
# TODO: why is this if block sitting here
if (not success or not response) and opts.mode == 'oobabooga':
# Ooba doesn't return any error messages
backend_response = format_sillytavern_err(f'Failed to reach the backend ({opts.mode}): {error_msg}', 'error')
@ -133,7 +134,7 @@ def generate():
else:
raise Exception
redis.incr('proompts')
log_prompt(client_ip, token, request_json_body['prompt'], backend_response if not backend_err else '', elapsed_time if not backend_err else None, parameters, dict(request.headers), response.status_code if response else 0, response_json_body.get('details', {}).get('generated_tokens'), is_error=backend_err)
log_prompt(client_ip, token, request_json_body['prompt'], backend_response, elapsed_time if not backend_err else None, parameters, dict(request.headers), response.status_code if response else 0, response_json_body.get('details', {}).get('generated_tokens'), is_error=backend_err)
return jsonify({
**response_json_body
}), 200