This commit is contained in:
saloui 2023-06-22 11:42:23 +02:00
parent 03ca58ab0a
commit bb896a4717

30
app.py
View File

@ -899,6 +899,36 @@ class LoLLMsWebUI(LoLLMsAPPI):
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")
try: