mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 19:15:28 +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
|
Handle generation using llama.cpp
|
||||||
"""
|
"""
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.llm = Llama.from_pretrained(
|
self.llm = None
|
||||||
repo_id=self.model,
|
|
||||||
filename="*q8_0.gguf",
|
|
||||||
verbose=True
|
|
||||||
)
|
|
||||||
|
|
||||||
def generate(self, history):
|
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.logger.info(f"Using {self.model} for generation with Llama.cpp")
|
||||||
self.llm.create_chat_completion(
|
self.llm.create_chat_completion(
|
||||||
messages = history
|
messages = history
|
||||||
|
Loading…
x
Reference in New Issue
Block a user