mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-20 21:03:07 +00:00
upgraded
This commit is contained in:
parent
03ca58ab0a
commit
bb896a4717
30
app.py
30
app.py
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user