feat(utils.py): json logs for raw request sent by litellm

make it easier to view verbose logs in datadog
This commit is contained in:
Krrish Dholakia 2024-04-29 19:21:19 -07:00
parent eea8a37ec9
commit 701be55872
5 changed files with 18 additions and 7 deletions

View file

@ -73,10 +73,6 @@ class LangsmithLogger:
elif type(value) != dict and is_serializable(value=value):
new_kwargs[key] = value
print(f"type of response: {type(response_obj)}")
for k, v in new_kwargs.items():
print(f"key={k}, type of arg: {type(v)}, value={v}")
if isinstance(response_obj, BaseModel):
try:
response_obj = response_obj.model_dump()