mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
support templates
This commit is contained in:
parent
4e74582b6f
commit
40eebc6bea
4 changed files with 368 additions and 9 deletions
|
@ -98,9 +98,12 @@ class LunaryLogger:
|
|||
)
|
||||
|
||||
tags = litellm_params.pop("tags", None) or []
|
||||
template_id = litellm_params.pop("templateId", None)
|
||||
|
||||
print(litellm_params)
|
||||
print(template_id)
|
||||
|
||||
if extra:
|
||||
template_id = extra.pop("templateId", None)
|
||||
extra.pop("extra_body", None)
|
||||
extra.pop("user", None)
|
||||
|
||||
|
@ -119,8 +122,6 @@ class LunaryLogger:
|
|||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
if response_obj:
|
||||
usage = (
|
||||
parse_usage(response_obj["usage"])
|
||||
|
@ -130,7 +131,6 @@ class LunaryLogger:
|
|||
|
||||
output = response_obj["choices"] if "choices" in response_obj else None
|
||||
|
||||
print(output)
|
||||
else:
|
||||
usage = None
|
||||
output = None
|
||||
|
@ -140,8 +140,6 @@ class LunaryLogger:
|
|||
else:
|
||||
error_obj = None
|
||||
|
||||
|
||||
|
||||
self.lunary_client.track_event(
|
||||
type,
|
||||
"start",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue