mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
(fix) issue with using litellm enterprise license
This commit is contained in:
parent
0924ec9e5d
commit
2d75daa6ab
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
Add a link
Reference in a new issue