mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(feat) better debugging when reading prisma
This commit is contained in:
parent
1f15c79252
commit
b64e4c3e6f
1 changed files with 10 additions and 0 deletions
|
@ -693,6 +693,9 @@ class PrismaClient:
|
|||
"""
|
||||
Generic implementation of get data
|
||||
"""
|
||||
verbose_proxy_logger.debug(
|
||||
f"PrismaClient: get_generic_data: {key}, table_name: {table_name}"
|
||||
)
|
||||
try:
|
||||
if table_name == "users":
|
||||
response = await self.db.litellm_usertable.find_first(
|
||||
|
@ -758,6 +761,9 @@ class PrismaClient:
|
|||
int
|
||||
] = None, # pagination, number of rows to getch when find_all==True
|
||||
):
|
||||
verbose_proxy_logger.debug(
|
||||
f"PrismaClient: get_data: table_name: {table_name}, query_type: {query_type}, user_id: {user_id}, user_id_list: {user_id_list}, team_id: {team_id}, team_id_list: {team_id_list}, key_val: {key_val}"
|
||||
)
|
||||
try:
|
||||
response: Any = None
|
||||
if (token is not None and table_name is None) or (
|
||||
|
@ -1020,6 +1026,7 @@ class PrismaClient:
|
|||
Add a key to the database. If it already exists, do nothing.
|
||||
"""
|
||||
try:
|
||||
verbose_proxy_logger.debug(f"PrismaClient: insert_data: {data}")
|
||||
if table_name == "key":
|
||||
token = data["token"]
|
||||
hashed_token = self.hash_token(token=token)
|
||||
|
@ -1152,6 +1159,9 @@ class PrismaClient:
|
|||
"""
|
||||
Update existing data
|
||||
"""
|
||||
verbose_proxy_logger.debug(
|
||||
f"PrismaClient: update_data, table_name: {table_name}"
|
||||
)
|
||||
try:
|
||||
db_data = self.jsonify_object(data=data)
|
||||
if update_key_values is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue