mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
Final bugfixes for the database
This commit is contained in:
parent
364c5e0e28
commit
f8ed24684a
6
app.py
6
app.py
@ -282,7 +282,7 @@ GPT4All:Welcome! I'm here to assist you with anything you need. What can I do fo
|
||||
data = request.get_json()
|
||||
discussion_id = data["id"]
|
||||
title = data["title"]
|
||||
Discussion.rename(self.db_path, discussion_id, title)
|
||||
self.db.rename(self.db_path, discussion_id, title)
|
||||
return "renamed successfully"
|
||||
|
||||
def restore_discussion(self, full_message):
|
||||
@ -314,7 +314,7 @@ GPT4All:Welcome! I'm here to assist you with anything you need. What can I do fo
|
||||
def delete_discussion(self):
|
||||
data = request.get_json()
|
||||
discussion_id = data["id"]
|
||||
self.current_discussion = Discussion(discussion_id, self.db_path)
|
||||
self.current_discussion = Discussion(discussion_id, self.db)
|
||||
self.current_discussion.delete_discussion()
|
||||
self.current_discussion = None
|
||||
return jsonify({})
|
||||
@ -337,7 +337,7 @@ GPT4All:Welcome! I'm here to assist you with anything you need. What can I do fo
|
||||
|
||||
def new_discussion(self):
|
||||
title = request.args.get("title")
|
||||
self.current_discussion = self.db.create_discussion(self.db_path, title)
|
||||
self.current_discussion = self.db.create_discussion(title)
|
||||
# Get the current timestamp
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user