From a594729d0007691ba989f93ec0b713f1d5ecf35d Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sun, 1 Oct 2023 22:37:13 -0600 Subject: [PATCH] fix keyerror --- llm_server/llm/openai/oai_to_vllm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: