fix - update webhook event validation

This commit is contained in:
Ishaan Jaff 2024-05-24 18:31:10 -07:00
parent db54599222
commit f6d7d0e520
2 changed files with 4 additions and 1 deletions

View file

@ -655,6 +655,9 @@ class SlackAlerting(CustomLogger):
_id = user_info.token
# percent of max_budget left to spend
if user_info.max_budget is None:
return
if user_info.max_budget > 0:
percent_left = (
user_info.max_budget - user_info.spend

View file

@ -1093,7 +1093,7 @@ class CallInfo(LiteLLMBase):
"""Used for slack budget alerting"""
spend: float
max_budget: float
max_budget: Optional[float] = None
token: str = Field(description="Hashed value of that key")
user_id: Optional[str] = None
team_id: Optional[str] = None