From 9e072f87bd2d17d3459123c44a12ac57f3581ce4 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 16 Nov 2023 12:38:27 -0800 Subject: [PATCH] (fix) bedrock meta llama optional params --- litellm/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index 05e84329e6b..79579c84c05 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2048,11 +2048,11 @@ def get_optional_params( # use the openai defaults supported_params = ["max_tokens", "temperature", "top_p", "stream"] _check_valid_arg(supported_params=supported_params) # see https://us-west-2.console.aws.amazon.com/bedrock/home?region=us-west-2#/providers?model=titan-large - if max_tokens: + if max_tokens is not None: optional_params["max_gen_len"] = max_tokens - if temperature: + if temperature is not None: optional_params["temperature"] = temperature - if top_p: + if top_p is not None: optional_params["top_p"] = top_p if stream: optional_params["stream"] = stream