refactor(main.py): trigger new build

This commit is contained in:
Krrish Dholakia 2024-02-19 22:53:38 -08:00
parent e2da1e8ac5
commit b3886b4bda
2 changed files with 4 additions and 3 deletions

View file

@ -13,6 +13,7 @@ from functools import partial
import dotenv, traceback, random, asyncio, time, contextvars import dotenv, traceback, random, asyncio, time, contextvars
from copy import deepcopy from copy import deepcopy
import httpx import httpx
import litellm import litellm
from ._logging import verbose_logger from ._logging import verbose_logger
from litellm import ( # type: ignore from litellm import ( # type: ignore

View file

@ -681,11 +681,11 @@ class PrismaClient:
return response return response
elif table_name == "user_notification": elif table_name == "user_notification":
if query_type == "find_unique": if query_type == "find_unique":
response = await self.db.litellm_usernotifications.find_unique( response = await self.db.litellm_usernotifications.find_unique( # type: ignore
where={"user_id": user_id} # type: ignore where={"user_id": user_id} # type: ignore
) )
elif query_type == "find_all": elif query_type == "find_all":
response = await self.db.litellm_usernotifications.find_many() response = await self.db.litellm_usernotifications.find_many() # type: ignore
return response return response
except Exception as e: except Exception as e:
print_verbose(f"LiteLLM Prisma Client Exception: {e}") print_verbose(f"LiteLLM Prisma Client Exception: {e}")
@ -795,7 +795,7 @@ class PrismaClient:
elif table_name == "user_notification": elif table_name == "user_notification":
db_data = self.jsonify_object(data=data) db_data = self.jsonify_object(data=data)
new_user_notification_row = ( new_user_notification_row = (
await self.db.litellm_usernotifications.upsert( await self.db.litellm_usernotifications.upsert( # type: ignore
where={"request_id": data["request_id"]}, where={"request_id": data["request_id"]},
data={ data={
"create": {**db_data}, # type: ignore "create": {**db_data}, # type: ignore