mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
upgraded
This commit is contained in:
parent
50ab1f3817
commit
4113fd559a
@ -285,7 +285,7 @@ class DiscussionsDB:
|
||||
discussion = {"id": discussion_id, "title": discussion_title, "messages": []}
|
||||
|
||||
# Insert discussion into the database
|
||||
self.insert("INSERT INTO discussion (id, title) VALUES (?, ?)", (discussion_id, discussion_title))
|
||||
discussion_id = self.insert("INSERT INTO discussion (title) VALUES (?)", (discussion_title,))
|
||||
|
||||
for message_data in messages_data:
|
||||
sender = message_data.get("sender")
|
||||
|
8
app.py
8
app.py
@ -248,8 +248,8 @@ class Gpt4AllWebUI(GPT4AllAPI):
|
||||
return jsonify(discussions)
|
||||
|
||||
def import_multiple_discussions(self):
|
||||
data = request.get_json()
|
||||
discussions = data
|
||||
discussions = request.get_json()["jArray"]
|
||||
self.db.import_from_json(discussions)
|
||||
return jsonify(discussions)
|
||||
|
||||
def reset(self):
|
||||
@ -317,8 +317,8 @@ class Gpt4AllWebUI(GPT4AllAPI):
|
||||
else:
|
||||
personality_info['avatar'] = ""
|
||||
personalities[language_folder.name][category_folder.name].append(personality_info)
|
||||
except:
|
||||
print(f"Couldn't load personality from {personality_folder}")
|
||||
except Exception as ex:
|
||||
print(f"Couldn't load personality from {personality_folder} [{ex}]")
|
||||
return json.dumps(personalities)
|
||||
|
||||
def get_personality():
|
||||
|
@ -35,8 +35,8 @@ class LLAMACPP(LLMBinding):
|
||||
"""
|
||||
super().__init__(config, False)
|
||||
seed = config["seed"]
|
||||
if seed <=0:
|
||||
seed = random.randint(1, 2**31)
|
||||
# if seed <=0:
|
||||
# seed = random.randint(1, 2**31)
|
||||
|
||||
if not "n_gpu_layers" in self.config:
|
||||
self.config["n_gpu_layers"] = 20
|
||||
|
Loading…
Reference in New Issue
Block a user