feat - send slack alerts litellm.router

This commit is contained in:
Ishaan Jaff 2024-05-07 15:10:47 -07:00
parent 84055c0546
commit 32f3e032e9

View file

@ -796,6 +796,14 @@ Model Info:
updated_at=litellm.utils.get_utc_datetime(), updated_at=litellm.utils.get_utc_datetime(),
) )
) )
if "llm_exceptions" in self.alert_types:
original_exception = kwargs.get("exception", None)
await self.send_alert(
message="LLM API Failure - " + str(original_exception),
level="High",
alert_type="llm_exceptions",
)
async def _run_scheduler_helper(self, llm_router: litellm.Router) -> bool: async def _run_scheduler_helper(self, llm_router: litellm.Router) -> bool:
""" """