mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-18 02:39:47 +00:00
bugfix, personality selection
This commit is contained in:
parent
2d598cc5fe
commit
7501de880a
18
app.py
18
app.py
@ -371,16 +371,30 @@ class Gpt4AllWebUI(GPT4AllAPI):
|
|||||||
|
|
||||||
def update_model_params(self):
|
def update_model_params(self):
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
backend = str(data["backend"])
|
||||||
model = str(data["model"])
|
model = str(data["model"])
|
||||||
|
personality_language = str(data["personality_language"])
|
||||||
|
personality_category = str(data["personality_category"])
|
||||||
personality = str(data["personality"])
|
personality = str(data["personality"])
|
||||||
if self.config['model'] != model:
|
|
||||||
|
if self.config['backend']!=backend or self.config['model'] != model:
|
||||||
print("New model selected")
|
print("New model selected")
|
||||||
|
|
||||||
|
self.config['backend'] = backend
|
||||||
self.config['model'] = model
|
self.config['model'] = model
|
||||||
self.create_chatbot()
|
self.create_chatbot()
|
||||||
|
|
||||||
|
if self.config['personality_language']!=data["personality_language"]:
|
||||||
|
self.config['personality_language'] = data["personality_language"]
|
||||||
|
self.personality = load_config(f"personalities/{self.config['personality_language']}/{self.config['personality_category']}/{self.config['personality']}.yaml")
|
||||||
|
|
||||||
|
if self.config['personality_category']!=data["personality_category"]:
|
||||||
|
self.config['personality_category'] = data["personality_category"]
|
||||||
|
self.personality = load_config(f"personalities/{self.config['personality_language']}/{self.config['personality_category']}/{self.config['personality']}.yaml")
|
||||||
|
|
||||||
if self.config['personality']!=data["personality"]:
|
if self.config['personality']!=data["personality"]:
|
||||||
self.config['personality'] = data["personality"]
|
self.config['personality'] = data["personality"]
|
||||||
self.personality = load_config(f"personalities/{self.config['personality']}.yaml")
|
self.personality = load_config(f"personalities/{self.config['personality_language']}/{self.config['personality_category']}/{self.config['personality']}.yaml")
|
||||||
|
|
||||||
self.config['n_predict'] = int(data["nPredict"])
|
self.config['n_predict'] = int(data["nPredict"])
|
||||||
self.config['seed'] = int(data["seed"])
|
self.config['seed'] = int(data["seed"])
|
||||||
|
Loading…
Reference in New Issue
Block a user