summaryrefslogtreecommitdiff
path: root/rag/generator
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-09 23:55:47 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-09 23:55:47 +0200
commit03fff940a0c1bf228f8754e4e4a07814bacf5369 (patch)
treec000b43feeee8fb43a0f9b3ed374d8f57e77f64d /rag/generator
parent6dffd12883bb032858a7bfbc336a1c41f4b16bd1 (diff)
Fix log messages
Diffstat (limited to 'rag/generator')
-rw-r--r--rag/generator/ollama.py4
1 files changed, 2 insertions, 2 deletions
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