This commit is contained in:
Cyberes 2023-10-04 13:03:58 -06:00
parent 6bad5b3fa0
commit d0eec88dbd
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,9 @@ from llm_server import opts
def oai_to_vllm(request_json_body, hashes: bool, mode): def oai_to_vllm(request_json_body, hashes: bool, mode):
if not request_json_body.get('stop'): if not request_json_body.get('stop'):
request_json_body['stop'] = [] request_json_body['stop'] = []
if not isinstance(request_json_body['stop'], list):
# It is a string, so create a list with the existing element
request_json_body['stop'] = [request_json_body['stop']]
print(request_json_body['stop']) print(request_json_body['stop'])