fix template tracking

This commit is contained in:
Vince Loewe 2024-02-28 23:10:06 -08:00
parent 6707ddefa5
commit e794a9d570
2 changed files with 3 additions and 11 deletions

View file

@ -98,14 +98,14 @@ class LunaryLogger:
)
tags = litellm_params.pop("tags", None) or []
template_id = litellm_params.pop("templateId", None)
print(litellm_params)
print(template_id)
if extra:
extra.pop("extra_body", None)
extra.pop("user", None)
template_id = extra.pop("extra_headers", {}).get("Template-Id", None)
# keep only serializable types
for param, value in extra.items():
@ -115,13 +115,6 @@ class LunaryLogger:
except:
pass
for param, value in metadata.items():
if not isinstance(value, (str, int, bool, float)):
try:
extra[param] = str(value)
except:
pass
if response_obj:
usage = (
parse_usage(response_obj["usage"])

View file

@ -557,7 +557,6 @@ def completion(
"output_cost_per_second",
"hf_model_name",
"model_info",
"templateId",
"proxy_server_request",
"preset_cache_key",
"caching_groups",