v0 basic structure

This commit is contained in:
ishaan-jaff 2024-01-25 09:58:43 -08:00 committed by Krrish Dholakia
parent 72275ad8cb
commit 565531fe9e
2 changed files with 36 additions and 0 deletions

View file

@ -181,6 +181,14 @@ class ProxyLogging:
level="Low",
)
async def budget_alerts(
self,
type: Literal["token_budget", "user_budget", "user_and_proxy_budget"],
user_max_budget: float,
user_current_spend: float,
):
pass
async def alerting_handler(
self, message: str, level: Literal["Low", "Medium", "High"]
):
@ -191,6 +199,8 @@ class ProxyLogging:
- Requests are hanging
- Calls are failing
- DB Read/Writes are failing
- Proxy Close to max budget
- Key Close to max budget
Parameters:
level: str - Low|Medium|High - if calls might fail (Medium) or are failing (High); Currently, no alerts would be 'Low'.