Skip to content

Commit

Permalink
Merge pull request #35 from FloRul/feature/api-auth
Browse files Browse the repository at this point in the history
Refactor retrieval.py to remove unnecessary print statement
  • Loading branch information
FloRul authored Feb 20, 2024
2 parents 9241401 + 8de7093 commit a32b89b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lambdas/inference/src/retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a32b89b

Please sign in to comment.