From 03fff940a0c1bf228f8754e4e4a07814bacf5369 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 9 Apr 2024 23:55:47 +0200 Subject: Fix log messages --- rag/generator/ollama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rag/generator/ollama.py') diff --git a/rag/generator/ollama.py b/rag/generator/ollama.py index cd8533b..87f9672 100644 --- a/rag/generator/ollama.py +++ b/rag/generator/ollama.py @@ -26,7 +26,7 @@ class Ollama(metaclass=AbstractGenerator): def __context(self, documents: List[Document]) -> str: results = [ - f"Document: {i}\ntitle: {doc.title}\n{doc.text}" + f"Document: {i}\ntitle: {doc.title}\ntext: {doc.text}" for i, doc in enumerate(documents) ] return "\n".join(results) @@ -60,7 +60,7 @@ class Ollama(metaclass=AbstractGenerator): return metaprompt def generate(self, prompt: Prompt) -> Generator[Any, Any, Any]: - log.debug("Generating answer...") + log.debug("Generating answer with ollama...") metaprompt = self.__metaprompt(prompt) for chunk in ollama.generate( model=self.model, prompt=metaprompt, system=SYSTEM_PROMPT, stream=True -- cgit v1.2.3-70-g09d2