"src/tl_templates/vscode:/vscode.git/clone" did not exist on "6ad73f6fa20d64e23d82f69f63e174453639f8a1"
Commit a1412d0b authored by tabaco.wang's avatar tabaco.wang
Browse files

fix: delete duplicate function

parent d865b9fe
...@@ -95,20 +95,6 @@ class ChatTable: ...@@ -95,20 +95,6 @@ class ChatTable:
except: except:
return None 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( def get_chat_lists_by_user_id(
self, user_id: str, skip: int = 0, limit: int = 50 self, user_id: str, skip: int = 0, limit: int = 50
) -> List[ChatModel]: ) -> List[ChatModel]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment