mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-22 17:52:35 +00:00
fix
This commit is contained in:
parent
06ca56febb
commit
32f17e68d4
6
app.py
6
app.py
@ -1140,15 +1140,15 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
|
|
||||||
def select_database(self):
|
def select_database(self):
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
self.config.db_path = data["name"]
|
if not data["name"].endswith(".db"):
|
||||||
if not self.config.db_path.endswith(".db"):
|
data["name"] += ".db"
|
||||||
self.config.db_path += ".db"
|
|
||||||
print(f'Selecting database {data["name"]}')
|
print(f'Selecting database {data["name"]}')
|
||||||
# Create database object
|
# Create database object
|
||||||
self.db = DiscussionsDB(self.lollms_paths.personal_databases_path/data["name"])
|
self.db = DiscussionsDB(self.lollms_paths.personal_databases_path/data["name"])
|
||||||
ASCIIColors.info("Checking discussions database... ",end="")
|
ASCIIColors.info("Checking discussions database... ",end="")
|
||||||
self.db.create_tables()
|
self.db.create_tables()
|
||||||
self.db.add_missing_columns()
|
self.db.add_missing_columns()
|
||||||
|
self.config.db_path = data["name"]
|
||||||
ASCIIColors.success("ok")
|
ASCIIColors.success("ok")
|
||||||
|
|
||||||
if self.config.auto_save:
|
if self.config.auto_save:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user