mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(fix) only set litellm call id if it's not set in completion()
This commit is contained in:
parent
e260a9cf2f
commit
fe4ef2bd57
1 changed files with 4 additions and 2 deletions
|
@ -757,8 +757,10 @@ def client(original_function):
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
start_time = datetime.datetime.now()
|
start_time = datetime.datetime.now()
|
||||||
result = None
|
result = None
|
||||||
litellm_call_id = str(uuid.uuid4())
|
|
||||||
kwargs["litellm_call_id"] = litellm_call_id
|
# only set litellm_call_id if its not in kwargs
|
||||||
|
if "litellm_call_id" not in kwargs:
|
||||||
|
kwargs["litellm_call_id"] = str(uuid.uuid4())
|
||||||
try:
|
try:
|
||||||
model = args[0] if len(args) > 0 else kwargs["model"]
|
model = args[0] if len(args) > 0 else kwargs["model"]
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue