summaryrefslogtreecommitdiff
path: root/rag/retriever
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-24 21:46:14 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-24 21:46:14 +0200
commit0fd41b05692085e8e4dab75a59f4c56ba4ac5ea7 (patch)
tree5ee5cd3a25babc092d13e1236a2d0ff6ea960ef3 /rag/retriever
parent619ac478879e9abab25cdc8193042aa55e600c1a (diff)
Add tqdm for encoding documents
Diffstat (limited to 'rag/retriever')
-rw-r--r--rag/retriever/encoder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rag/retriever/encoder.py b/rag/retriever/encoder.py
index 68d0e26..6176a37 100644
--- a/rag/retriever/encoder.py
+++ b/rag/retriever/encoder.py
@@ -7,6 +7,7 @@ import ollama
from langchain_core.documents import Document
from loguru import logger as log
from qdrant_client.http.models import StrictFloat
+from tqdm import tqdm
from .vector import Point
@@ -34,7 +35,7 @@ class Encoder:
"source": self.__get_source(chunk.metadata),
},
)
- for chunk in chunks
+ for chunk in tqdm(chunks)
]
def encode_query(self, query: str) -> List[StrictFloat]: