mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-29 15:44:12 +00:00
upgraded
This commit is contained in:
parent
9f46573826
commit
d10fc189ce
@ -281,9 +281,8 @@ class ModelProcess:
|
||||
personality = AIPersonality(self.lollms_paths, personality_path, run_scripts=True, model=self.model)
|
||||
self.mounted_personalities.append(personality)
|
||||
except Exception as ex:
|
||||
print(f"Personality file not found or is corrupted ({personality_path}).\nPlease verify that the personality you have selected exists or select another personality. Some updates may lead to change in personality name or category, so check the personality selection in settings to be sure.")
|
||||
if self.config["debug"]:
|
||||
print(ex)
|
||||
ASCIIColors.error(f"Personality file not found or is corrupted ({personality_path}).\nPlease verify that the personality you have selected exists or select another personality. Some updates may lead to change in personality name or category, so check the personality selection in settings to be sure.")
|
||||
ASCIIColors.error(f"Exception received is: {ex}")
|
||||
personality = AIPersonality(self.lollms_paths, model=self.model)
|
||||
failed_personalities.append(personality_path)
|
||||
self._set_config_result['errors'].append(f"couldn't build personalities:{ex}")
|
||||
@ -296,9 +295,11 @@ class ModelProcess:
|
||||
self._set_config_result['status'] ='semi_failed'
|
||||
self._set_config_result['personalities_status'] ='semi_failed'
|
||||
|
||||
self.personality = self.mounted_personalities[self.config['active_personality_id']]
|
||||
self.mounted_personalities = self.config["personalities"]
|
||||
ASCIIColors.success("Personality set successfully")
|
||||
if self.config['active_personality_id']<len(self.mounted_personalities):
|
||||
self.personality = self.mounted_personalities[self.config['active_personality_id']]
|
||||
ASCIIColors.success("Personality set successfully")
|
||||
else:
|
||||
ASCIIColors.error("Failed to set personality. Please select a valid one")
|
||||
|
||||
def _run(self):
|
||||
self._rebuild_model()
|
||||
|
3
app.py
3
app.py
@ -565,8 +565,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
personalities = [f.stem for f in personalities_dir.iterdir() if f.is_dir()]
|
||||
except Exception as ex:
|
||||
personalities=[]
|
||||
if self.config["debug"]:
|
||||
print(f"No personalities found. Using default one {ex}")
|
||||
ASCIIColors.error(f"No personalities found. Using default one {ex}")
|
||||
return jsonify(personalities)
|
||||
|
||||
def list_languages(self):
|
||||
|
1
web/dist/assets/index-29d93ec2.css
vendored
Normal file
1
web/dist/assets/index-29d93ec2.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
web/dist/assets/index-5a7db389.css
vendored
1
web/dist/assets/index-5a7db389.css
vendored
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-aeb5a3c1.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-5a7db389.css">
|
||||
<script type="module" crossorigin src="/assets/index-ce2e3117.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-29d93ec2.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -938,7 +938,6 @@ export default {
|
||||
this.api_get_req("list_models").then(response => { this.modelsArr = response })
|
||||
//this.api_get_req("list_personalities_languages").then(response => { this.persLangArr = response })
|
||||
this.api_get_req("list_personalities_categories").then(response => { this.persCatgArr = response })
|
||||
this.api_get_req("list_personalities").then(response => { this.persArr = response })
|
||||
//this.api_get_req("list_languages").then(response => { this.langArr = response })
|
||||
this.api_get_req("get_config").then(response => {
|
||||
console.log("Received config")
|
||||
@ -961,6 +960,10 @@ export default {
|
||||
this.configFile.personality_folder = response["personality_name"]
|
||||
console.log("received infos")
|
||||
});
|
||||
this.api_get_req("list_personalities").then(response => {
|
||||
this.persArr = response
|
||||
console.log(`Listed personalities:\n${response}`)
|
||||
})
|
||||
this.api_get_req("disk_usage").then(response => {
|
||||
this.diskUsage = response
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user