mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
upgraded ui
This commit is contained in:
parent
86d3448829
commit
74a5d4e73d
14
app.py
14
app.py
@ -477,7 +477,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
if self.config["debug"]:
|
||||
print(f"Configuration {data['setting_name']} set to {data['setting_value']}")
|
||||
|
||||
print(f"Configuration {data['setting_name']} updated")
|
||||
ASCIIColors.success(f"Configuration {data['setting_name']} updated")
|
||||
# Tell that the setting was changed
|
||||
return jsonify({'setting_name': data['setting_name'], "status":True})
|
||||
|
||||
@ -724,7 +724,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
|
||||
|
||||
def mount_personality(self):
|
||||
print("- Mounting personality")
|
||||
print("- Mounting personality ...",end="")
|
||||
try:
|
||||
data = request.get_json()
|
||||
# Further processing of the data
|
||||
@ -743,16 +743,18 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
self.mounted_personalities = self.process.rebuild_personalities()
|
||||
self.personality = self.mounted_personalities[self.config["active_personality_id"]]
|
||||
self.apply_settings()
|
||||
ASCIIColors.success("ok")
|
||||
return jsonify({"status": True,
|
||||
"personalities":self.config["personalities"],
|
||||
"active_personality_id":self.config["active_personality_id"]
|
||||
})
|
||||
else:
|
||||
pth = str(config_file).replace('\\','/')
|
||||
ASCIIColors.error(f"nok : Personality not found @ {pth}")
|
||||
return jsonify({"status": False, "error":f"Personality not found @ {pth}"})
|
||||
|
||||
def unmount_personality(self):
|
||||
print("- Unmounting personality")
|
||||
print("- Unmounting personality ...",end="")
|
||||
try:
|
||||
data = request.get_json()
|
||||
# Further processing of the data
|
||||
@ -774,27 +776,33 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
self.personalities = []
|
||||
self.personality = None
|
||||
self.apply_settings()
|
||||
ASCIIColors.success("ok")
|
||||
return jsonify({
|
||||
"status": True,
|
||||
"personalities":self.config["personalities"],
|
||||
"active_personality_id":self.config["active_personality_id"]
|
||||
})
|
||||
except:
|
||||
ASCIIColors.error(f"nok : Personality not found @ {pth}")
|
||||
return jsonify({"status": False, "error":"Couldn't unmount personality"})
|
||||
|
||||
def select_personality(self):
|
||||
print("- Selecting active personality ...",end="")
|
||||
|
||||
data = request.get_json()
|
||||
id = data['id']
|
||||
if id<len(self.config["personalities"]):
|
||||
self.config["active_personality_id"]=id
|
||||
self.personality = self.mounted_personalities[self.config["active_personality_id"]]
|
||||
self.apply_settings()
|
||||
ASCIIColors.success("ok")
|
||||
return jsonify({
|
||||
"status": True,
|
||||
"personalities":self.config["personalities"],
|
||||
"active_personality_id":self.config["active_personality_id"]
|
||||
})
|
||||
else:
|
||||
ASCIIColors.error(f"nok : Personality not found @ {pth}")
|
||||
return jsonify({"status": False, "error":"Invalid ID"})
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
web/dist/index.html
vendored
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>GPT4All - WEBUI</title>
|
||||
<script type="module" crossorigin src="/assets/index-90e5688b.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-7fdd6f06.css">
|
||||
<script type="module" crossorigin src="/assets/index-15f764ca.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-b23f444b.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -232,9 +232,6 @@
|
||||
<h3 class="font-bold font-large text-lg line-clamp-1">
|
||||
{{ configFile.model_name }}
|
||||
</h3>
|
||||
<button @click.stop="showAddModelDialog" class="text-base hover:text-primary-dark ml-1 bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-dark-tone duration-200 rounded-lg px-2 py-1">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user