mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): set call_type at the top of the function
This commit is contained in:
parent
9dc972de70
commit
93a52a2d35
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue