diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-09 23:55:47 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-09 23:55:47 +0200 |
commit | 03fff940a0c1bf228f8754e4e4a07814bacf5369 (patch) | |
tree | c000b43feeee8fb43a0f9b3ed374d8f57e77f64d /rag | |
parent | 6dffd12883bb032858a7bfbc336a1c41f4b16bd1 (diff) |
Fix log messages
Diffstat (limited to 'rag')
-rw-r--r-- | rag/generator/ollama.py | 4 | ||||
-rw-r--r-- | rag/retriever/vector.py | 2 |
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...") |