File tree 5 files changed +7
-6
lines changed
5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -181,3 +181,4 @@ compile_commands.json
181
181
/bin
182
182
cmake_install.cmake
183
183
CMakeCache.txt
184
+ /.fwd_cache
Original file line number Diff line number Diff line change 1
1
from .state import LlamaPersistantState , STATE_PROMPTS
2
- from .cache import _LlamaCacheManager , CACHE_TYPES
2
+ from .cache import LlamaCacheManager , CACHE_TYPES
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class CACHE_TYPES(BaseModel):
22
22
cache_type : Literal ["disk" , "ram" ]
23
23
24
24
25
- class _LlamaCacheManager (Llama ):
25
+ class LlamaCacheManager (Llama ):
26
26
"""A class for an LLM to always use a specific state with a prompt.
27
27
This should be inherited by a strategy class and not used directly."""
28
28
Original file line number Diff line number Diff line change 9
9
import llama_cpp .llama_tokenizer as llama_tokenizer
10
10
11
11
from llama_cpp .server .settings import ModelSettings
12
-
12
+ from llama_cpp . managers . cache import LlamaCacheManager
13
13
14
14
class LlamaProxy :
15
15
def __init__ (self , models : List [ModelSettings ]) -> None :
@@ -132,7 +132,7 @@ def load_llama_from_model_settings(settings: ModelSettings) -> llama_cpp.Llama:
132
132
filename = settings .model ,
133
133
)
134
134
else :
135
- create_fn = llama_cpp . Llama
135
+ create_fn = LlamaCacheManager
136
136
kwargs ["model_path" ] = settings .model
137
137
138
138
_model = create_fn (
Original file line number Diff line number Diff line change 1
- from ..managers .cache import _LlamaCacheManager , CACHE_TYPES
1
+ from ..managers .cache import CACHE_TYPES , LlamaCacheManager
2
2
3
3
4
- class ChatHistoryStrategy (_LlamaCacheManager ):
4
+ class ChatHistoryStrategy (LlamaCacheManager ):
5
5
"""A class for an LLM to always use a specific state with a prompt."""
6
6
7
7
def __init__ (
You can’t perform that action at this time.
0 commit comments