Replies: 1 comment
-
ok found that there is a metadata arg for that :D |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I want to use
CustomLogger
to create a callback handler that reports to our internal metering service.How do I best make additional (non-litellm) metadata liker
user_id
available for the callback?I hoped to be able to access them from
kwargs
as I was expectinglitellm.completion
orlitellm.acompletion
to let me pass these through askwargs
added to the call, but that's not the case, it errors withUnrecognized request argument supplied
.My plan B is to set them in the init of the handler, but this requires reinstantiating all callbacks for each call which is not desired.
So my question is if there is any known solution of how to pass additional metadata through the completion and make them accessible in the callbacks?
Beta Was this translation helpful? Give feedback.
All reactions