forked from phoenix/litellm-mirror
updating build to include helicone integration
This commit is contained in:
parent
a764401642
commit
10832be1e4
22 changed files with 127 additions and 15 deletions
|
@ -237,14 +237,16 @@ def handle_success(args, kwargs, result, start_time, end_time):
|
|||
print_verbose("reaches helicone for logging!")
|
||||
model = args[0] if len(args) > 0 else kwargs["model"]
|
||||
messages = args[1] if len(args) > 1 else kwargs["messages"]
|
||||
heliconeLogger.log_success(model=model, messages=messages, response_obj=result, start_time=start_time, end_time=end_time)
|
||||
heliconeLogger.log_success(model=model, messages=messages, response_obj=result, start_time=start_time, end_time=end_time, print_verbose=print_verbose)
|
||||
except:
|
||||
print_verbose(f"Success Callback Error - {traceback.format_exc()}")
|
||||
pass
|
||||
|
||||
if success_handler and callable(success_handler):
|
||||
success_handler(args, kwargs)
|
||||
pass
|
||||
except:
|
||||
print_verbose(f"Success Callback Error - {traceback.format_exc()}")
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue