Reduce number of documents to return for Pinecone (#2299)

Minor change: Currently, Pinecone is returning 5 documents instead of
the 4 seen in other vectorstores, and the comments this Pinecone script
itself. Adjusted it from 5 to 4.
This commit is contained in:
Kenneth Leung 2023-04-03 05:04:23 +08:00 committed by GitHub
parent fe572a5a0d
commit 00d3ec5ed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ class Pinecone(VectorStore):
def similarity_search_with_score(
self,
query: str,
k: int = 5,
k: int = 4,
filter: Optional[dict] = None,
namespace: Optional[str] = None,
) -> List[Tuple[Document, float]]:
@ -125,7 +125,7 @@ class Pinecone(VectorStore):
def similarity_search(
self,
query: str,
k: int = 5,
k: int = 4,
filter: Optional[dict] = None,
namespace: Optional[str] = None,
**kwargs: Any,