mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fix(llmonitor callback): correctly set user_id
This commit is contained in:
parent
8b9f30038d
commit
1897a1ee46
4 changed files with 5 additions and 4 deletions
|
@ -1831,7 +1831,7 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k
|
|||
llmonitorLogger.log_event(
|
||||
type=type,
|
||||
event="error",
|
||||
user_id=litellm._thread_context.user,
|
||||
user_id=kwargs.get("user", "default"),
|
||||
model=model,
|
||||
input=input,
|
||||
error=traceback_exception,
|
||||
|
@ -1951,7 +1951,7 @@ def handle_success(args, kwargs, result, start_time, end_time):
|
|||
event="end",
|
||||
model=model,
|
||||
input=input,
|
||||
user_id=litellm._thread_context.user,
|
||||
user_id=kwargs.get("user", "default"),
|
||||
response_obj=result,
|
||||
start_time=start_time,
|
||||
end_time=end_time,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue