removed stuff

This commit is contained in:
Saifeddine ALOUI 2023-06-17 19:45:51 +02:00
parent e802c8a81b
commit 8bcfa6a152
2 changed files with 2 additions and 4 deletions

View File

@ -364,8 +364,9 @@ class Discussion:
message_id (int): The id of the message to be changed
new_content (str): The nex message content
"""
current_date_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
self.discussions_db.update(
f"UPDATE message SET content = ?, finished_generating_at = ? WHERE id = ?",(new_content, datetime.now().strftime('%Y-%m-%d %H:%M:%S'),message_id)
f"UPDATE message SET content = ?, finished_generating_at = ? WHERE id = ?",(new_content, current_date_time,message_id)
)
def message_rank_up(self, message_id):

3
app.py
View File

@ -864,9 +864,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
return "title renamed successfully"
def load_discussion(self):
print("- Loading discussion")
data = request.get_json()
print(" Recovered json data")
if "id" in data:
discussion_id = data["id"]
self.current_discussion = Discussion(discussion_id, self.db)
@ -876,7 +874,6 @@ class LoLLMsWebUI(LoLLMsAPPI):
self.current_discussion = Discussion(discussion_id, self.db)
else:
self.current_discussion = self.db.create_discussion()
print(f" Discussion id :{discussion_id}")
messages = self.current_discussion.get_messages()