(feat) write team_id to User Table

This commit is contained in:
ishaan-jaff 2024-01-18 14:42:46 -08:00
parent 5beef6dbcd
commit 2b6972111e
3 changed files with 5 additions and 0 deletions

View file

@ -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,
}

View file

@ -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?

View file

@ -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?