From d1b35174773896cb3452f7875f7cacaddd486bf9 Mon Sep 17 00:00:00 2001 From: Mug <> Date: Wed, 5 Apr 2023 14:23:01 +0200 Subject: [PATCH] Allow local llama library usage --- examples/llama_cpp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/llama_cpp.py b/examples/llama_cpp.py index 5f22f6b50..8bc0b577b 100644 --- a/examples/llama_cpp.py +++ b/examples/llama_cpp.py @@ -29,9 +29,12 @@ def _load_shared_library(lib_base_name): # Construct the paths to the possible shared library names _base_path = pathlib.Path(__file__).parent.resolve() + _local_path = pathlib.Path.cwd() # 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 = [ + _local_path / f"./lib{lib_base_name}{lib_ext}", + _local_path / f"./{lib_base_name}{lib_ext}", _base_path / f"lib{lib_base_name}{lib_ext}", _base_path / f"{lib_base_name}{lib_ext}" ]