mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
fix : server problem with llamacpp
This commit is contained in:
parent
4676b817e9
commit
44e0508ae5
@ -9,13 +9,15 @@ class LlamacppLLM(GeneratorLLM):
|
||||
Handle generation using llama.cpp
|
||||
"""
|
||||
super().__init__()
|
||||
self.llm = Llama.from_pretrained(
|
||||
repo_id=self.model,
|
||||
filename="*q8_0.gguf",
|
||||
verbose=True
|
||||
)
|
||||
self.llm = None
|
||||
|
||||
def generate(self, history):
|
||||
if self.model is None:
|
||||
self.llm = Llama.from_pretrained(
|
||||
repo_id=self.model,
|
||||
filename="*q8_0.gguf",
|
||||
verbose=True
|
||||
)
|
||||
self.logger.info(f"Using {self.model} for generation with Llama.cpp")
|
||||
self.llm.create_chat_completion(
|
||||
messages = history
|
||||
|
Loading…
x
Reference in New Issue
Block a user