Look for libllama in parent directory

This commit is contained in:
Don Mahurin 2023-05-23 06:21:31 -07:00
parent 4ad62c489d
commit e5dad2afa0

View file

@ -31,10 +31,12 @@ def _load_shared_library(lib_base_name: str):
# Construct the paths to the possible shared library names
_base_path = pathlib.Path(__file__).parent.resolve()
_base_path_parent = pathlib.Path(__file__).parent.parent.resolve()
# Searching for the library in the current directory under the name "libllama" (default name
# for llamacpp) and "llama" (default name for this repo)
_lib_paths = [
_base_path / f"lib{lib_base_name}{lib_ext}",
_base_path_parent / f"lib{lib_base_name}{lib_ext}",
_base_path / f"{lib_base_name}{lib_ext}",
]