diff --git a/app.py b/app.py index 8087e0ba..e85fd8d4 100644 --- a/app.py +++ b/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) diff --git a/lollms_core b/lollms_core index 5f1365c3..26c1b62f 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 5f1365c3069b48c070cb53b69ae628c29479f532 +Subproject commit 26c1b62f04db6405b7d6ff5f495e70caeeff62be diff --git a/web/src/main.js b/web/src/main.js index 5f0f814c..d0ecfad6 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -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" diff --git a/zoos/bindings_zoo b/zoos/bindings_zoo index 1020afe4..5f12891d 160000 --- a/zoos/bindings_zoo +++ b/zoos/bindings_zoo @@ -1 +1 @@ -Subproject commit 1020afe4b96cbdf3c8e6cd075c0be0d12290586b +Subproject commit 5f12891d580f71b2fa7613897f2e545c5c7804d4