forked from phoenix/litellm-mirror
refactor(proxy_server.py): initial stubbed endpoints for team management
This commit is contained in:
parent
a61b0bf9e5
commit
d589061a9c
1 changed files with 58 additions and 1 deletions
|
@ -2798,7 +2798,7 @@ async def image_generation(
|
|||
)
|
||||
|
||||
|
||||
#### KEY MANAGEMENT ####
|
||||
#### KEY MANAGEMENT #####
|
||||
|
||||
|
||||
@router.post(
|
||||
|
@ -3159,6 +3159,9 @@ async def info_key_fn(
|
|||
)
|
||||
|
||||
|
||||
#### SPEND MANAGEMENT #####
|
||||
|
||||
|
||||
@router.get(
|
||||
"/spend/keys",
|
||||
tags=["budget & spend Tracking"],
|
||||
|
@ -3946,6 +3949,60 @@ async def user_update(data: UpdateUserRequest):
|
|||
)
|
||||
|
||||
|
||||
#### TEAM MANAGEMENT ####
|
||||
|
||||
|
||||
@router.post(
|
||||
"/team/new", tags=["team management"], dependencies=[Depends(user_api_key_auth)]
|
||||
)
|
||||
async def new_team():
|
||||
"""
|
||||
Create a new team
|
||||
|
||||
Parameters:
|
||||
- team_alias: Optional[str] - User defined team alias
|
||||
- team_id: Optional[str] - The team id of the user. If none passed, we'll generate it.
|
||||
- team_admins: list - A list of user IDs that will be owning the team
|
||||
- metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" }
|
||||
|
||||
Returns:
|
||||
- key: (str) The generated api key
|
||||
- expires: (datetime) Datetime object for when key expires.
|
||||
- team_id: (str) Unique team id - used for tracking spend across multiple keys for same team id.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@router.post(
|
||||
"/team/update", tags=["team management"], dependencies=[Depends(user_api_key_auth)]
|
||||
)
|
||||
async def update_team():
|
||||
"""
|
||||
update team and members
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@router.post(
|
||||
"/team/delete", tags=["team management"], dependencies=[Depends(user_api_key_auth)]
|
||||
)
|
||||
async def delete_team():
|
||||
"""
|
||||
delete team and team keys
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@router.post(
|
||||
"/team/info", tags=["team management"], dependencies=[Depends(user_api_key_auth)]
|
||||
)
|
||||
async def info_team():
|
||||
"""
|
||||
get info on team + related keys
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
#### MODEL MANAGEMENT ####
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue