From 3c42bf8d97325c5ae728feeb4e3463357e983846 Mon Sep 17 00:00:00 2001 From: Guangdong Liu Date: Sat, 22 Jun 2024 04:27:52 +0800 Subject: [PATCH] community(patch):Fix PineconeHynridSearchRetriever not having search_kwargs (#21577) - close #21521 --- .../langchain_community/retrievers/pinecone_hybrid_search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/community/langchain_community/retrievers/pinecone_hybrid_search.py b/libs/community/langchain_community/retrievers/pinecone_hybrid_search.py index 333d30a089..fdc1828716 100644 --- a/libs/community/langchain_community/retrievers/pinecone_hybrid_search.py +++ b/libs/community/langchain_community/retrievers/pinecone_hybrid_search.py @@ -152,7 +152,7 @@ class PineconeHybridSearchRetriever(BaseRetriever): return values def _get_relevant_documents( - self, query: str, *, run_manager: CallbackManagerForRetrieverRun + self, query: str, *, run_manager: CallbackManagerForRetrieverRun, **kwargs: Any ) -> List[Document]: from pinecone_text.hybrid import hybrid_convex_scale @@ -169,6 +169,7 @@ class PineconeHybridSearchRetriever(BaseRetriever): top_k=self.top_k, include_metadata=True, namespace=self.namespace, + **kwargs, ) final_result = [] for res in result["matches"]: