forked from phoenix/litellm-mirror
(fix) using callbacks with router
This commit is contained in:
parent
668d45393c
commit
80884e9cb3
1 changed files with 4 additions and 1 deletions
|
@ -81,6 +81,9 @@ class Router:
|
||||||
self.cache_responses = cache_responses
|
self.cache_responses = cache_responses
|
||||||
self.cache = litellm.Cache(cache_config) # use Redis for tracking load balancing
|
self.cache = litellm.Cache(cache_config) # use Redis for tracking load balancing
|
||||||
## USAGE TRACKING ##
|
## USAGE TRACKING ##
|
||||||
|
if type(litellm.success_callback) == list:
|
||||||
|
litellm.success_callback.append(self.deployment_callback)
|
||||||
|
else:
|
||||||
litellm.success_callback = [self.deployment_callback]
|
litellm.success_callback = [self.deployment_callback]
|
||||||
|
|
||||||
def _start_health_check_thread(self):
|
def _start_health_check_thread(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue