(feat) /predict/spend endpoint

This commit is contained in:
ishaan-jaff 2024-03-01 08:20:35 -08:00
parent 3bb861ae02
commit 47c5b94c50
2 changed files with 44 additions and 20 deletions

View file

@ -4190,6 +4190,18 @@ async def global_spend_models(
return response
@router.post(
"/global/predict/spend/logs",
tags=["Budget & Spend Tracking"],
dependencies=[Depends(user_api_key_auth)],
)
async def global_predict_spend_logs(request: Request):
from litellm.proxy.enterprise.utils import _forecast_daily_cost
data = await request.json()
return _forecast_daily_cost(data)
@router.get(
"/daily_metrics",
summary="Get daily spend metrics",