Skip to content

Commit 0b6d13b

Browse files
author
Don Mahurin
committed
Look for libllama in parent directory
1 parent 8a21022 commit 0b6d13b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/llama_cpp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ def _load_shared_library(lib_base_name: str):
3131

3232
# Construct the paths to the possible shared library names
3333
_base_path = pathlib.Path(__file__).parent.resolve()
34+
_base_path_parent = pathlib.Path(__file__).parent.parent.resolve()
3435
# Searching for the library in the current directory under the name "libllama" (default name
3536
# for llamacpp) and "llama" (default name for this repo)
3637
_lib_paths = [
3738
_base_path / f"lib{lib_base_name}{lib_ext}",
39+
_base_path_parent / f"lib{lib_base_name}{lib_ext}",
3840
_base_path / f"{lib_base_name}{lib_ext}",
3941
]
4042

0 commit comments

Comments
 (0)