From c0c3117dec426696a98d8c93ae0614c9629de7fc Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 6 Mar 2024 20:47:05 -0800 Subject: [PATCH] fix(utils.py): fix get optional param embeddings --- litellm/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index 68dc137afbc..a1f1bb374c5 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -4030,11 +4030,11 @@ def get_optional_params_embeddings( keys = list(non_default_params.keys()) for k in keys: non_default_params.pop(k, None) - return non_default_params - raise UnsupportedParamsError( - status_code=500, - message=f"Setting user/encoding format is not supported by {custom_llm_provider}. To drop it from the call, set `litellm.drop_params = True`.", - ) + else: + raise UnsupportedParamsError( + status_code=500, + message=f"Setting user/encoding format is not supported by {custom_llm_provider}. To drop it from the call, set `litellm.drop_params = True`.", + ) final_params = {**non_default_params, **kwargs} return final_params