From c446dcd7756bcfa634a83e29daba6cf383218314 Mon Sep 17 00:00:00 2001 From: lucac Date: Mon, 25 Nov 2024 14:07:35 +0100 Subject: [PATCH] issue #1118: HYBRID as constant --- ai-packages/rag-module/app/rag/retriever.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ai-packages/rag-module/app/rag/retriever.py b/ai-packages/rag-module/app/rag/retriever.py index 0d62f6b0b..e8f02fb38 100644 --- a/ai-packages/rag-module/app/rag/retriever.py +++ b/ai-packages/rag-module/app/rag/retriever.py @@ -9,6 +9,7 @@ TOKEN_SIZE = 3.5 MAX_CONTEXT_WINDOW_PERCENTAGE = 0.85 +HYBRID_RETRIEVE_TYPE = "HYBRID" class OpenSearchRetriever(BaseRetriever): @@ -67,7 +68,7 @@ def _get_relevant_documents( query = query_data.query index_name = list(query_data.indexName) query_parameters = query_data.queryParameters - params = query_parameters if self.retrieve_type == "HYBRID" else None + params = query_parameters if self.retrieve_type == HYBRID_RETRIEVE_TYPE else None documents = []