mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
fix - update webhook event validation
This commit is contained in:
parent
db54599222
commit
f6d7d0e520
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue