From 08d9fc9aeae26778dfbb045f740d5408193435d0 Mon Sep 17 00:00:00 2001 From: Rajendra Kadam Date: Fri, 15 Nov 2024 16:58:23 +0530 Subject: [PATCH] Support for new Pinecone class PineconeVectorStore --- .../chains/pebblo_retrieval/enforcement_filters.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/community/langchain_community/chains/pebblo_retrieval/enforcement_filters.py b/libs/community/langchain_community/chains/pebblo_retrieval/enforcement_filters.py index df58543250065..60a3002f172c8 100644 --- a/libs/community/langchain_community/chains/pebblo_retrieval/enforcement_filters.py +++ b/libs/community/langchain_community/chains/pebblo_retrieval/enforcement_filters.py @@ -27,8 +27,9 @@ PINECONE = "Pinecone" QDRANT = "Qdrant" PGVECTOR = "PGVector" +PINECONE_VECTOR_STORE = "PineconeVectorStore" -SUPPORTED_VECTORSTORES = {PINECONE, QDRANT, PGVECTOR} +SUPPORTED_VECTORSTORES = {PINECONE, QDRANT, PGVECTOR, PINECONE_VECTOR_STORE} def clear_enforcement_filters(retriever: VectorStoreRetriever) -> None: @@ -508,7 +509,7 @@ def _set_identity_enforcement_filter( of the retriever based on the type of the vectorstore. """ search_kwargs = retriever.search_kwargs - if retriever.vectorstore.__class__.__name__ == PINECONE: + if retriever.vectorstore.__class__.__name__ in [PINECONE, PINECONE_VECTOR_STORE]: _apply_pinecone_authorization_filter(search_kwargs, auth_context) elif retriever.vectorstore.__class__.__name__ == QDRANT: _apply_qdrant_authorization_filter(search_kwargs, auth_context)