From a1412d0b55d88980cdf93fa19f02ceae13a05d02 Mon Sep 17 00:00:00 2001 From: "tabaco.wang" Date: Thu, 21 Mar 2024 10:31:25 +0800 Subject: [PATCH] fix: delete duplicate function --- backend/apps/web/models/chats.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/backend/apps/web/models/chats.py b/backend/apps/web/models/chats.py index ca55c71d8..c9d130044 100644 --- a/backend/apps/web/models/chats.py +++ b/backend/apps/web/models/chats.py @@ -95,20 +95,6 @@ class ChatTable: except: return None - def update_chat_by_id(self, id: str, chat: dict) -> Optional[ChatModel]: - try: - query = Chat.update( - chat=json.dumps(chat), - title=chat["title"] if "title" in chat else "New Chat", - timestamp=int(time.time()), - ).where(Chat.id == id) - query.execute() - - chat = Chat.get(Chat.id == id) - return ChatModel(**model_to_dict(chat)) - except: - return None - def get_chat_lists_by_user_id( self, user_id: str, skip: int = 0, limit: int = 50 ) -> List[ChatModel]: