mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
fix: lunary callback tags
This commit is contained in:
parent
5994ca572c
commit
93cb18c633
1 changed files with 2 additions and 4 deletions
|
@ -105,19 +105,17 @@ class LunaryLogger:
|
||||||
end_time=datetime.now(timezone.utc),
|
end_time=datetime.now(timezone.utc),
|
||||||
error=None,
|
error=None,
|
||||||
):
|
):
|
||||||
# Method definition
|
|
||||||
try:
|
try:
|
||||||
print_verbose(f"Lunary Logging - Logging request for model {model}")
|
print_verbose(f"Lunary Logging - Logging request for model {model}")
|
||||||
|
|
||||||
litellm_params = kwargs.get("litellm_params", {})
|
litellm_params = kwargs.get("litellm_params", {})
|
||||||
optional_params = kwargs.get("optional_params", {})
|
optional_params = kwargs.get("optional_params", {})
|
||||||
metadata = litellm_params.get("metadata", {}) or {}
|
metadata = litellm_params.get("metadata", {})
|
||||||
|
|
||||||
if optional_params:
|
if optional_params:
|
||||||
# merge into extra
|
|
||||||
extra = {**extra, **optional_params}
|
extra = {**extra, **optional_params}
|
||||||
|
|
||||||
tags = litellm_params.pop("tags", None) or []
|
tags = metadata.get("metadata", None)
|
||||||
|
|
||||||
if extra:
|
if extra:
|
||||||
extra.pop("extra_body", None)
|
extra.pop("extra_body", None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue