diff --git a/lollms/binding.py b/lollms/binding.py index dde80fe..9101d83 100644 --- a/lollms/binding.py +++ b/lollms/binding.py @@ -223,7 +223,16 @@ class LLMBinding: model_path=None for mn in self.models_folders: if mn.name in model_name.lower(): - model_path = mn/model_name + if mn.name == "ggml": + idx = model_name.index("-GGML") + models=[m for m in mn.iterdir() if model_name[:idx] in m.name] + model_path = mn/models[0].name + elif mn.name == "gguf": + idx = model_name.index("-GGUF") + models=[m for m in mn.iterdir() if model_name[:idx] in m.name] + model_path = mn/models[0].name + else: + model_path = mn/model_name break if model_path is None: model_path = self.models_folders[0]/model_name @@ -352,7 +361,7 @@ class LLMBinding: """ models = [] for models_folder in self.models_folders: - if models_folder in ["ggml","gguf"]: + if models_folder.name in ["ggml","gguf"]: models+=[f.name for f in models_folder.iterdir() if f.suffix in self.supported_file_extensions or f.suffix==".reference"] else: models+=[f.name for f in models_folder.iterdir() if f.is_dir() and not f.stem.startswith(".") or f.suffix==".reference"] diff --git a/setup.py b/setup.py index 9c4cc8c..13d5d58 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_all_files(path): setuptools.setup( name="lollms", - version="5.8.3", + version="5.8.5", author="Saifeddine ALOUI", author_email="aloui.saifeddine@gmail.com", description="A python library for AI personality definition",