mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-18 02:39:47 +00:00
upgraded the format
This commit is contained in:
parent
1968ffb0a5
commit
ac5889c964
21
app.py
21
app.py
@ -1357,8 +1357,9 @@ try:
|
||||
|
||||
def list_models(self):
|
||||
if self.binding is not None:
|
||||
models = self.binding.list_models(self.config)
|
||||
ASCIIColors.yellow("Listing models")
|
||||
models = self.binding.list_models()
|
||||
ASCIIColors.green("ok")
|
||||
return jsonify(models)
|
||||
else:
|
||||
return jsonify([])
|
||||
@ -1366,14 +1367,15 @@ try:
|
||||
def get_active_model(self):
|
||||
if self.binding is not None:
|
||||
try:
|
||||
models = self.binding.list_models(self.config)
|
||||
ASCIIColors.yellow("Getting active model")
|
||||
models = self.binding.list_models()
|
||||
index = models.index(self.config.model_name)
|
||||
ASCIIColors.yellow("Listing active models")
|
||||
return jsonify({"model":models[index],"index":index})
|
||||
ASCIIColors.green("ok")
|
||||
return jsonify({"status":True,"model":models[index],"index":index})
|
||||
except Exception as ex:
|
||||
return jsonify(None)
|
||||
return jsonify({"status":False})
|
||||
else:
|
||||
return jsonify(None)
|
||||
return jsonify({"status":False})
|
||||
|
||||
def list_personalities_categories(self):
|
||||
personalities_categories_dir = self.lollms_paths.personalities_zoo_path # replace with the actual path to the models folder
|
||||
@ -2470,7 +2472,12 @@ try:
|
||||
"""
|
||||
if self.binding is None:
|
||||
return jsonify([])
|
||||
model_list = self.binding.get_available_models()
|
||||
try:
|
||||
model_list = self.binding.get_available_models(self)
|
||||
except Exception as ex:
|
||||
self.error("Coudln't list models. Please reinstall the binding or notify ParisNeo on the discord server")
|
||||
return jsonify([])
|
||||
|
||||
return jsonify(model_list)
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 5f1365c3069b48c070cb53b69ae628c29479f532
|
||||
Subproject commit 26c1b62f04db6405b7d6ff5f495e70caeeff62be
|
@ -508,6 +508,10 @@ app.mixin({
|
||||
console.log("Calling")
|
||||
this.$store.state.loading_infos = "Loading Configuration"
|
||||
this.$store.state.loading_progress = 10
|
||||
try{
|
||||
|
||||
}
|
||||
catch
|
||||
await this.$store.dispatch('refreshConfig');
|
||||
console.log("Config ready")
|
||||
this.$store.state.loading_infos = "Loading Database"
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1020afe4b96cbdf3c8e6cd075c0be0d12290586b
|
||||
Subproject commit 5f12891d580f71b2fa7613897f2e545c5c7804d4
|
Loading…
Reference in New Issue
Block a user