From 8de70933f6d85611c28c4d761da72bff75eebc36 Mon Sep 17 00:00:00 2001 From: Florian Rumiel Date: Tue, 20 Feb 2024 15:13:00 -0500 Subject: [PATCH] Refactor retrieval.py to remove unnecessary print statement --- lambdas/inference/src/retrieval.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lambdas/inference/src/retrieval.py b/lambdas/inference/src/retrieval.py index 7596af1..1b1b123 100644 --- a/lambdas/inference/src/retrieval.py +++ b/lambdas/inference/src/retrieval.py @@ -52,8 +52,7 @@ def fetch_documents(self, query: str, top_k: int = 10): docs = self._vector_store.similarity_search_with_relevance_scores( query=query, k=top_k ) - print(f"retrieved docs: {docs}") - return [x[0] for x in docs if x[1] > self._relevance_treshold] + return [x for x in docs if x[1] > self._relevance_treshold] except Exception as e: print(f"Error while retrieving documents : {e}") raise e