mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(feat) return team alias when hitting user/info
This commit is contained in:
parent
6ba774ace4
commit
7f793246c2
1 changed files with 12 additions and 0 deletions
|
@ -5290,6 +5290,18 @@ async def user_info(
|
||||||
key = key.dict()
|
key = key.dict()
|
||||||
key.pop("token", None)
|
key.pop("token", None)
|
||||||
|
|
||||||
|
if (
|
||||||
|
"team_id" in key
|
||||||
|
and key["team_id"] is not None
|
||||||
|
and key["team_id"] != "litellm-dashboard"
|
||||||
|
):
|
||||||
|
team_info = await prisma_client.get_data(
|
||||||
|
team_id=key["team_id"], table_name="team"
|
||||||
|
)
|
||||||
|
key["team_alias"] = team_info["team_alias"]
|
||||||
|
else:
|
||||||
|
key["team_alias"] = "None"
|
||||||
|
|
||||||
response_data = {
|
response_data = {
|
||||||
"user_id": user_id,
|
"user_id": user_id,
|
||||||
"user_info": user_info,
|
"user_info": user_info,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue