mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-07 13:40:46 +00:00
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:
parent
fe572a5a0d
commit
00d3ec5ed8
@ -90,7 +90,7 @@ class Pinecone(VectorStore):
|
|||||||
def similarity_search_with_score(
|
def similarity_search_with_score(
|
||||||
self,
|
self,
|
||||||
query: str,
|
query: str,
|
||||||
k: int = 5,
|
k: int = 4,
|
||||||
filter: Optional[dict] = None,
|
filter: Optional[dict] = None,
|
||||||
namespace: Optional[str] = None,
|
namespace: Optional[str] = None,
|
||||||
) -> List[Tuple[Document, float]]:
|
) -> List[Tuple[Document, float]]:
|
||||||
@ -125,7 +125,7 @@ class Pinecone(VectorStore):
|
|||||||
def similarity_search(
|
def similarity_search(
|
||||||
self,
|
self,
|
||||||
query: str,
|
query: str,
|
||||||
k: int = 5,
|
k: int = 4,
|
||||||
filter: Optional[dict] = None,
|
filter: Optional[dict] = None,
|
||||||
namespace: Optional[str] = None,
|
namespace: Optional[str] = None,
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
|
Loading…
Reference in New Issue
Block a user