From 8481e21317d4835551adb8d80debc125f975db8d Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 6 Nov 2023 14:35:06 -0800 Subject: [PATCH] (fix) HF round up temperature 0 -> 0.01 --- litellm/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index b4fb5976d0d..a311b14cc1e 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1463,7 +1463,7 @@ def get_optional_params( # use the openai defaults if temperature == 0.0 or temperature == 0: # hugging face exception raised when temp==0 # Failed: Error occurred: HuggingfaceException - Input validation error: `temperature` must be strictly positive - temperature = 0.0001 + temperature = 0.01 optional_params["temperature"] = temperature if top_p is not None: optional_params["top_p"] = top_p