fix(litellm_logging.py): fix circular reference

This commit is contained in:
Krrish Dholakia 2024-07-15 21:26:47 -07:00
parent eaee90b02e
commit d136f2b8a7
2 changed files with 10 additions and 7 deletions

View file

@ -165,6 +165,11 @@ class CompletionCustomHandler(
def log_success_event(self, kwargs, response_obj, start_time, end_time):
try:
print(f"\n\nkwargs={kwargs}\n\n")
print(
json.dumps(kwargs, default=str)
) # this is a test to confirm no circular references are in the logging object
self.states.append("sync_success")
## START TIME
assert isinstance(start_time, datetime)