mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
build(ui/litellm-dashboard): ui cleanup
This commit is contained in:
parent
c15f3559ca
commit
00a25ebfb8
8 changed files with 1135 additions and 129 deletions
|
@ -1386,12 +1386,7 @@ async def generate_key_helper_fn(
|
|||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR)
|
||||
return {
|
||||
"token": token,
|
||||
"expires": expires,
|
||||
"user_id": user_id,
|
||||
"max_budget": max_budget,
|
||||
}
|
||||
return key_data
|
||||
|
||||
|
||||
async def delete_verification_token(tokens: List):
|
||||
|
@ -2399,12 +2394,9 @@ async def generate_key_fn(
|
|||
data_json["key_budget_duration"] = data_json.pop("budget_duration", None)
|
||||
|
||||
response = await generate_key_helper_fn(**data_json)
|
||||
return GenerateKeyResponse(
|
||||
key=response["token"],
|
||||
expires=response["expires"],
|
||||
user_id=response["user_id"],
|
||||
)
|
||||
return GenerateKeyResponse(**response)
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
if isinstance(e, HTTPException):
|
||||
raise ProxyException(
|
||||
message=getattr(e, "detail", f"Authentication Error({str(e)})"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue