The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
style(core,langchain,qdrant): fix some docstrings for refs (#34105)
Mason Daughertyc6f8b0875a96
diff --git a/libs/core/langchain_core/vectorstores/base.py b/libs/core/langchain_core/vectorstores/base.pyindex 1f7f73e709..f9fccff671 100644--- a/libs/core/langchain_core/vectorstores/base.py+++ b/libs/core/langchain_core/vectorstores/base.py@@ -294,8 +294,9 @@ class VectorStore(ABC):Args:query: Input text.- search_type: Type of search to perform. Can be `'similarity'`, `'mmr'`, or- `'similarity_score_threshold'`.+ search_type: Type of search to perform.++ Can be `'similarity'`, `'mmr'`, or `'similarity_score_threshold'`.**kwargs: Arguments to pass to the search method.Returns:@@ -328,8 +329,9 @@ class VectorStore(ABC):Args:query: Input text.- search_type: Type of search to perform. Can be `'similarity'`, `'mmr'`, or- `'similarity_score_threshold'`.+ search_type: Type of search to perform.++ Can be `'similarity'`, `'mmr'`, or `'similarity_score_threshold'`.**kwargs: Arguments to pass to the search method.Returns:@@ -460,9 +462,10 @@ class VectorStore(ABC):Args:query: Input text.k: Number of `Document` objects to return.- **kwargs: kwargs to be passed to similarity search. Should include- `score_threshold`, An optional floating point value between `0` to `1`- to filter the resulting set of retrieved docs+ **kwargs: Kwargs to be passed to similarity search.++ Should include `score_threshold`, an optional floating point value+ between `0` to `1` to filter the resulting set of retrieved docs.Returns:List of tuples of `(doc, similarity_score)`@@ -487,9 +490,10 @@ class VectorStore(ABC):Args:query: Input text.k: Number of `Document` objects to return.- **kwargs: kwargs to be passed to similarity search. Should include- `score_threshold`, An optional floating point value between `0` to `1`- to filter the resulting set of retrieved docs+ **kwargs: Kwargs to be passed to similarity search.++ Should include `score_threshold`, an optional floating point value+ between `0` to `1` to filter the resulting set of retrieved docs.Returns:List of tuples of `(doc, similarity_score)`@@ -511,9 +515,10 @@ class VectorStore(ABC):Args:query: Input text.k: Number of `Document` objects to return.- **kwargs: kwargs to be passed to similarity search. Should include- `score_threshold`, An optional floating point value between `0` to `1`- to filter the resulting set of retrieved docs+ **kwargs: Kwargs to be passed to similarity search.++ Should include `score_threshold`, an optional floating point value+ between `0` to `1` to filter the resulting set of retrieved docs.Returns:List of tuples of `(doc, similarity_score)`.@@ -560,9 +565,10 @@ class VectorStore(ABC):Args:query: Input text.k: Number of `Document` objects to return.- **kwargs: kwargs to be passed to similarity search. Should include- `score_threshold`, An optional floating point value between `0` to `1`- to filter the resulting set of retrieved docs+ **kwargs: Kwargs to be passed to similarity search.++ Should include `score_threshold`, an optional floating point value+ between `0` to `1` to filter the resulting set of retrieved docs.Returns:List of tuples of `(doc, similarity_score)`@@ -900,13 +906,15 @@ class VectorStore(ABC):Args:**kwargs: Keyword arguments to pass to the search function.+Can include:* `search_type`: Defines the type of search that the Retriever shouldperform. Can be `'similarity'` (default), `'mmr'`, or`'similarity_score_threshold'`.- * `search_kwargs`: Keyword arguments to pass to the search function. Can- include things like:+ * `search_kwargs`: Keyword arguments to pass to the search function.++ Can include things like:* `k`: Amount of documents to return (Default: `4`)* `score_threshold`: Minimum relevance thresholddiff --git a/libs/langchain/langchain_classic/retrievers/multi_vector.py b/libs/langchain/langchain_classic/retrievers/multi_vector.pyindex 1a569b7e13..dcf438bb7f 100644--- a/libs/langchain/langchain_classic/retrievers/multi_vector.py+++ b/libs/langchain/langchain_classic/retrievers/multi_vector.py@@ -32,13 +32,18 @@ class MultiVectorRetriever(BaseRetriever):vectorstore: VectorStore"""The underlying `VectorStore` to use to store small chunksand their embedding vectors"""+byte_store: ByteStore | None = None"""The lower-level backing storage layer for the parent documents"""+docstore: BaseStore[str, Document]"""The storage interface for the parent documents"""+id_key: str = "doc_id"+search_kwargs: dict = Field(default_factory=dict)"""Keyword arguments to pass to the search function."""+search_type: SearchType = SearchType.similarity"""Type of search to perform (similarity / mmr)"""diff --git a/libs/partners/qdrant/langchain_qdrant/vectorstores.py b/libs/partners/qdrant/langchain_qdrant/vectorstores.pyindex 95f5500a13..364b7edf20 100644--- a/libs/partners/qdrant/langchain_qdrant/vectorstores.py+++ b/libs/partners/qdrant/langchain_qdrant/vectorstores.py@@ -1980,9 +1980,10 @@ class Qdrant(VectorStore):Args:query: input textk: Number of Documents to return.- **kwargs: kwargs to be passed to similarity search. Should include- `score_threshold`, An optional floating point value between `0` to `1`- to filter the resulting set of retrieved docs+ **kwargs: Kwargs to be passed to similarity search.++ Should include `score_threshold`, an optional floating point value+ between `0` to `1` to filter the resulting set of retrieved docs.Returns:List of tuples of `(doc, similarity_score)`@@ -2004,9 +2005,10 @@ class Qdrant(VectorStore):Args:query: input textk: Number of Documents to return.- **kwargs: kwargs to be passed to similarity search. Should include- `score_threshold`, An optional floating point value between `0` to `1`- to filter the resulting set of retrieved docs+ **kwargs: Kwargs to be passed to similarity search.++ Should include `score_threshold`, an optional floating point value+ between `0` to `1` to filter the resulting set of retrieved docs.Returns:List of tuples of `(doc, similarity_score)`