mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix - only adding alerting callbacks when alerting is on
This commit is contained in:
parent
02fc507b01
commit
f417495b7b
1 changed files with 7 additions and 1 deletions
|
@ -131,7 +131,13 @@ class ProxyLogging:
|
|||
alerting_args=alerting_args,
|
||||
)
|
||||
|
||||
if "daily_reports" in self.alert_types:
|
||||
if (
|
||||
self.alerting is not None
|
||||
and "slack" in self.alerting
|
||||
and "daily_reports" in self.alert_types
|
||||
):
|
||||
# NOTE: ENSURE we only add callbacks when alerting is on
|
||||
# We should NOT add callbacks when alerting is off
|
||||
litellm.callbacks.append(self.slack_alerting_instance) # type: ignore
|
||||
|
||||
if redis_cache is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue