This commit is contained in:
saloui 2023-10-09 12:54:48 +02:00
parent 06ca56febb
commit 32f17e68d4

6
app.py
View File

@ -1140,15 +1140,15 @@ class LoLLMsWebUI(LoLLMsAPPI):
def select_database(self):
data = request.get_json()
self.config.db_path = data["name"]
if not self.config.db_path.endswith(".db"):
self.config.db_path += ".db"
if not data["name"].endswith(".db"):
data["name"] += ".db"
print(f'Selecting database {data["name"]}')
# Create database object
self.db = DiscussionsDB(self.lollms_paths.personal_databases_path/data["name"])
ASCIIColors.info("Checking discussions database... ",end="")
self.db.create_tables()
self.db.add_missing_columns()
self.config.db_path = data["name"]
ASCIIColors.success("ok")
if self.config.auto_save: