Update llama_cpp.py with PR requests

lib_base_name and load_shared_library
to 
_lib_base_name and _load_shared_library
This commit is contained in:
MillionthOdin16 2023-04-03 13:06:50 -04:00 committed by GitHub
parent a40476e299
commit a0758f0077
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ from ctypes import c_int, c_float, c_char_p, c_void_p, c_bool, POINTER, Structur
import pathlib import pathlib
# Load the library # Load the library
def load_shared_library(lib_base_name): def _load_shared_library(lib_base_name):
# Determine the file extension based on the platform # Determine the file extension based on the platform
if sys.platform.startswith("linux"): if sys.platform.startswith("linux"):
lib_ext = ".so" lib_ext = ".so"
@ -40,10 +40,10 @@ def load_shared_library(lib_base_name):
raise FileNotFoundError(f"Shared library with base name '{lib_base_name}' not found") raise FileNotFoundError(f"Shared library with base name '{lib_base_name}' not found")
# Specify the base name of the shared library to load # Specify the base name of the shared library to load
lib_base_name = "llama" _lib_base_name = "llama"
# Load the library # Load the library
_lib = load_shared_library(lib_base_name) _lib = _load_shared_library(_lib_base_name)
# C types # C types
llama_context_p = c_void_p llama_context_p = c_void_p