mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Add gemini audio input support + handle special tokens in sagemaker response (#9640)
* fix(internal_user_endpoints.py): cleanup unused variables on beta endpoint no team/org split on daily user endpoint * build(model_prices_and_context_window.json): gemini-2.0-flash supports audio input * feat(gemini/transformation.py): support passing audio input to gemini * test: fix test * fix(gemini/transformation.py): support audio input as a url enables passing google cloud bucket urls * fix(gemini/transformation.py): support explicitly passing format of file * fix(gemini/transformation.py): expand support for inferred file types from url * fix(sagemaker/completion/transformation.py): fix special token error when counting sagemaker tokens * test: fix import
This commit is contained in:
parent
af885be743
commit
70f993d3d7
11 changed files with 191 additions and 58 deletions
|
@ -1370,22 +1370,6 @@ async def get_user_daily_activity(
|
|||
default=None,
|
||||
description="End date in YYYY-MM-DD format",
|
||||
),
|
||||
group_by: List[GroupByDimension] = fastapi.Query(
|
||||
default=[GroupByDimension.DATE],
|
||||
description="Dimensions to group by. Can combine multiple (e.g. date,team)",
|
||||
),
|
||||
view_by: Literal["team", "organization", "user"] = fastapi.Query(
|
||||
default="user",
|
||||
description="View spend at team/org/user level",
|
||||
),
|
||||
team_id: Optional[str] = fastapi.Query(
|
||||
default=None,
|
||||
description="Filter by specific team",
|
||||
),
|
||||
org_id: Optional[str] = fastapi.Query(
|
||||
default=None,
|
||||
description="Filter by specific organization",
|
||||
),
|
||||
model: Optional[str] = fastapi.Query(
|
||||
default=None,
|
||||
description="Filter by specific model",
|
||||
|
@ -1408,13 +1392,13 @@ async def get_user_daily_activity(
|
|||
Meant to optimize querying spend data for analytics for a user.
|
||||
|
||||
Returns:
|
||||
(by date/team/org/user/model/api_key/model_group/provider)
|
||||
(by date)
|
||||
- spend
|
||||
- prompt_tokens
|
||||
- completion_tokens
|
||||
- total_tokens
|
||||
- api_requests
|
||||
- breakdown by team, organization, user, model, api_key, model_group, provider
|
||||
- breakdown by model, api_key, provider
|
||||
"""
|
||||
from litellm.proxy.proxy_server import prisma_client
|
||||
|
||||
|
@ -1439,10 +1423,6 @@ async def get_user_daily_activity(
|
|||
}
|
||||
}
|
||||
|
||||
if team_id:
|
||||
where_conditions["team_id"] = team_id
|
||||
if org_id:
|
||||
where_conditions["organization_id"] = org_id
|
||||
if model:
|
||||
where_conditions["model"] = model
|
||||
if api_key:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue