mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Use fastuuid for litellm_call_id (#14346)
(cherry picked from commit 201806401ff12564fb6065b69cd8af347ed7c8e6)
This commit is contained in:
parent
285b14bd69
commit
29309f767c
1 changed files with 7 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ import subprocess
|
|||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import uuid
|
||||
import fastuuid as uuid
|
||||
from datetime import datetime as dt_object
|
||||
from functools import lru_cache
|
||||
from typing import (
|
||||
|
|
@ -1714,9 +1714,12 @@ class Logging(LiteLLMLoggingBaseClass):
|
|||
response_obj=result,
|
||||
start_time=start_time,
|
||||
end_time=end_time,
|
||||
litellm_call_id=litellm_params.get(
|
||||
"litellm_call_id", str(uuid.uuid4())
|
||||
),
|
||||
litellm_call_id=current_call_id
|
||||
if (
|
||||
current_call_id := litellm_params.get("litellm_call_id")
|
||||
)
|
||||
is not None
|
||||
else str(uuid.uuid4()),
|
||||
print_verbose=print_verbose,
|
||||
)
|
||||
if callback == "wandb" and weightsBiasesLogger is not None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue