diff --git a/app.py b/app.py index beff611a..eaa1e150 100644 --- a/app.py +++ b/app.py @@ -321,11 +321,16 @@ class Gpt4AllWebUI(GPT4AllAPI): def update_model_params(self): data = request.get_json() model = str(data["model"]) + personality = str(data["personality"]) if self.config['model'] != model: print("New model selected") self.config['model'] = model self.create_chatbot() + if self.config['personality']!=data["personality"]: + self.config['personality'] = data["personality"] + self.personality = load_config(f"personalities/{self.config['personality']}.yaml") + self.config['n_predict'] = int(data["nPredict"]) self.config['seed'] = int(data["seed"]) self.config['model'] = str(data["model"])