(fix) using callbacks with router

This commit is contained in:
ishaan-jaff 2023-11-20 19:04:10 -08:00
parent 668d45393c
commit 80884e9cb3

View file

@ -81,7 +81,10 @@ 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 ##
litellm.success_callback = [self.deployment_callback] if type(litellm.success_callback) == list:
litellm.success_callback.append(self.deployment_callback)
else:
litellm.success_callback = [self.deployment_callback]
def _start_health_check_thread(self): def _start_health_check_thread(self):
""" """