Merge branch 'main' into litellm_ui_fixes_6

This commit is contained in:
Krish Dholakia 2024-05-07 22:01:04 -07:00 committed by GitHub
commit 0e709fdc21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 631 additions and 185 deletions

View file

@ -340,3 +340,19 @@ class RetryPolicy(BaseModel):
RateLimitErrorRetries: Optional[int] = None
ContentPolicyViolationErrorRetries: Optional[int] = None
InternalServerErrorRetries: Optional[int] = None
class AlertingConfig(BaseModel):
"""
Use this configure alerting for the router. Receive alerts on the following events
- LLM API Exceptions
- LLM Responses Too Slow
- LLM Requests Hanging
Args:
webhook_url: str - webhook url for alerting, slack provides a webhook url to send alerts to
alerting_threshold: Optional[float] = None - threshold for slow / hanging llm responses (in seconds)
"""
webhook_url: str
alerting_threshold: Optional[float] = 300