fix crash again

This commit is contained in:
Cyberes 2023-08-31 09:31:16 -06:00
parent bf39b8da63
commit 2d8812a6cd
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ import time
from typing import Union
from flask import jsonify
from requests.exceptions import InvalidJSONError
from llm_server import opts
from llm_server.database import log_prompt
@ -75,7 +74,7 @@ class OobaRequestHandler:
# Fix bug on text-generation-inference
# https://github.com/huggingface/text-generation-inference/issues/929
if opts.mode == 'hf-textgen' and self.parameters.get('typical_p', 0) > 0.998:
self.parameters['typical_p'] = 0.998
self.request_json_body['typical_p'] = 0.998
request_valid, invalid_request_err_msg = self.validate_request()
params_valid, invalid_params_err_msg = self.backend.validate_params(self.parameters)