mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge pull request #2500 from BerriAI/litellm_fix_using_enterpise
(fix) issue with using litellm enterprise on Admin UI
This commit is contained in:
commit
fd99f9f64a
1 changed files with 6 additions and 2 deletions
|
|
@ -4512,8 +4512,12 @@ async def global_spend_models(
|
|||
dependencies=[Depends(user_api_key_auth)],
|
||||
)
|
||||
async def global_predict_spend_logs(request: Request):
|
||||
from litellm.proxy.enterprise.utils import _forecast_daily_cost
|
||||
|
||||
try:
|
||||
# when using litellm package
|
||||
from litellm.proxy.enterprise.utils import _forecast_daily_cost
|
||||
except:
|
||||
# when using litellm docker image
|
||||
from enterprise.utils import _forecast_daily_cost
|
||||
data = await request.json()
|
||||
data = data.get("data")
|
||||
return _forecast_daily_cost(data)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue