diff --git a/llm_server/llm/openai/oai_to_vllm.py b/llm_server/llm/openai/oai_to_vllm.py index 5f58da5..237dc16 100644 --- a/llm_server/llm/openai/oai_to_vllm.py +++ b/llm_server/llm/openai/oai_to_vllm.py @@ -37,9 +37,9 @@ def format_oai_err(err_msg): def validate_oai(parameters): - if parameters['temperature'] > 2: + if parameters.get('temperature', 0) > 2: return format_oai_err(f"{parameters['temperature']} is greater than the maximum of 2 - 'temperature'") - if parameters['temperature'] < 0: + if parameters.get('temperature', 0) < 0: return format_oai_err(f"{parameters['temperature']} less than the minimum of 0 - 'temperature'") if parameters.get('top_p', 1) > 2: