mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(feat) improve litellm verbose logs
This commit is contained in:
parent
f297a4d174
commit
1fb3547e48
1 changed files with 20 additions and 0 deletions
|
@ -8282,6 +8282,26 @@ def transform_logprobs(hf_response):
|
|||
|
||||
def print_args_passed_to_litellm(original_function, args, kwargs):
|
||||
try:
|
||||
# we've already printed this for acompletion, don't print for completion
|
||||
if (
|
||||
"acompletion" in kwargs
|
||||
and kwargs["acompletion"] == True
|
||||
and original_function.__name__ == "completion"
|
||||
):
|
||||
return
|
||||
elif (
|
||||
"aembedding" in kwargs
|
||||
and kwargs["aembedding"] == True
|
||||
and original_function.__name__ == "embedding"
|
||||
):
|
||||
return
|
||||
elif (
|
||||
"aimg_generation" in kwargs
|
||||
and kwargs["aimg_generation"] == True
|
||||
and original_function.__name__ == "img_generation"
|
||||
):
|
||||
return
|
||||
|
||||
args_str = ", ".join(map(repr, args))
|
||||
kwargs_str = ", ".join(f"{key}={repr(value)}" for key, value in kwargs.items())
|
||||
print_verbose("\n") # new line before
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue