From bb896a47177270c992d41c05a2657f5a577617a9 Mon Sep 17 00:00:00 2001 From: saloui Date: Thu, 22 Jun 2023 11:42:23 +0200 Subject: [PATCH] upgraded --- app.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app.py b/app.py index eecb2cae..a3f897e8 100644 --- a/app.py +++ b/app.py @@ -898,6 +898,36 @@ class LoLLMsWebUI(LoLLMsAPPI): return jsonify({}) else: return jsonify({}) + + + def set_active_personality_settings(self): + print("- Setting personality settings") + try: + data = request.get_json() + # Further processing of the data + except Exception as e: + print(f"Error occurred while parsing JSON: {e}") + return + + if self.personality.processor is not None: + if hasattr(self.personality.processor,"personality_config"): + self.personality.processor.personality_config.update_template(data) + return jsonify() + else: + return jsonify({'status':False}) + else: + return jsonify({}) + + def get_active_binding_settings(self): + print("- Retreiving binding settings") + if self.binding is not None: + if hasattr(self.binding,"binding_config"): + return jsonify(self.binding.binding_config.config_template.template) + else: + return jsonify({}) + else: + return jsonify({}) + def get_personality_settings(self): print("- Retreiving personality settings")