From c804efe3f01fed7f1a098c75f4972d9a7fba2f46 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Sun, 14 May 2023 22:08:11 -0400 Subject: [PATCH] Fix obscure Wndows DLL issue. Closes #208 --- llama_cpp/llama_cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_cpp/llama_cpp.py b/llama_cpp/llama_cpp.py index 71e78d9..ab74c41 100644 --- a/llama_cpp/llama_cpp.py +++ b/llama_cpp/llama_cpp.py @@ -52,7 +52,7 @@ def _load_shared_library(lib_base_name: str): for _lib_path in _lib_paths: if _lib_path.exists(): try: - return ctypes.CDLL(str(_lib_path)) + return ctypes.CDLL(str(_lib_path), winmode=0) except Exception as e: raise RuntimeError(f"Failed to load shared library '{_lib_path}': {e}")