This commit is contained in:
Alex
2023-10-01 17:20:47 +01:00
parent b47ecab1a9
commit 9bbf4044e0
7 changed files with 137 additions and 56 deletions

View File

@@ -4,7 +4,10 @@ class LlamaCpp(BaseLLM):
def __init__(self, api_key, llm_name='/Users/pavel/Desktop/docsgpt/application/models/orca-test.bin'):
global llama
from llama_cpp import Llama
try:
from llama_cpp import Llama
except ImportError:
raise ImportError("Please install llama_cpp using pip install llama-cpp-python")
llama = Llama(model_path=llm_name)