summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rag/generator/ollama.py4
-rw-r--r--rag/retriever/vector.py2
2 files changed, 3 insertions, 3 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
diff --git a/rag/retriever/vector.py b/rag/retriever/vector.py
index fd2b2c2..e8d22c2 100644
--- a/rag/retriever/vector.py
+++ b/rag/retriever/vector.py
@@ -40,7 +40,7 @@ class VectorDB:
vectors_config=VectorParams(size=self.dim, distance=Distance.COSINE),
)
else:
- log.debug(f"Collection {self.collection_name} already exists...")
+ log.debug(f"Collection {self.collection_name} already exists!")
def add(self, points: List[Point]):
log.debug(f"Inserting {len(points)} vectors into the vector db...")