From 93a52a2d358083ae095f7ebbd85b1db9ed1f4d83 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 31 Jan 2024 18:23:44 -0800 Subject: [PATCH] fix(utils.py): set call_type at the top of the function --- litellm/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index 8acabd2850..c9fccdc6c0 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2094,13 +2094,13 @@ def client(original_function): logging_obj = kwargs.get("litellm_logging_obj", None) # only set litellm_call_id if its not in kwargs + call_type = original_function.__name__ if "litellm_call_id" not in kwargs: kwargs["litellm_call_id"] = str(uuid.uuid4()) try: model = args[0] if len(args) > 0 else kwargs["model"] except: model = None - call_type = original_function.__name__ if ( call_type != CallTypes.image_generation.value and call_type != CallTypes.text_completion.value