forked from phoenix/litellm-mirror
(feat) write team_id to User Table
This commit is contained in:
parent
5beef6dbcd
commit
2b6972111e
3 changed files with 5 additions and 0 deletions
|
@ -1081,12 +1081,15 @@ async def generate_key_helper_fn(
|
|||
config_json = json.dumps(config)
|
||||
metadata_json = json.dumps(metadata)
|
||||
user_id = user_id or str(uuid.uuid4())
|
||||
if type(team_id) is not str:
|
||||
team_id = str(team_id)
|
||||
try:
|
||||
# Create a new verification token (you may want to enhance this logic based on your needs)
|
||||
user_data = {
|
||||
"max_budget": max_budget,
|
||||
"user_email": user_email,
|
||||
"user_id": user_id,
|
||||
"team_id": team_id,
|
||||
"spend": spend,
|
||||
"models": models,
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ generator client {
|
|||
|
||||
model LiteLLM_UserTable {
|
||||
user_id String @unique
|
||||
team_id String?
|
||||
max_budget Float?
|
||||
spend Float @default(0.0)
|
||||
user_email String?
|
||||
|
|
|
@ -9,6 +9,7 @@ generator client {
|
|||
|
||||
model LiteLLM_UserTable {
|
||||
user_id String @unique
|
||||
team_id String?
|
||||
max_budget Float?
|
||||
spend Float @default(0.0)
|
||||
user_email String?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue