style(core): lint (#34862)

it looks scary but i promise it is not

improving documentation consistency across core. primarily update
docstrings and comments for better formatting, readability, and
accuracy, as well as add minor clarifications and formatting
improvements to user-facing documentation.
This commit is contained in:
Mason Daugherty
2026-01-23 23:07:48 -05:00
committed by GitHub
parent 51f13f7bff
commit 11df1bedc3
102 changed files with 1333 additions and 1031 deletions

View File

@@ -1,4 +1,4 @@
"""**Retriever** class returns Documents given a text **query**.
"""**Retriever** class returns `Document` objects given a text **query**.
It is more general than a vector store. A retriever does not need to be able to
store documents, only to return (or retrieve) it. Vector stores can be used as
@@ -41,10 +41,13 @@ class LangSmithRetrieverParams(TypedDict, total=False):
ls_retriever_name: str
"""Retriever name."""
ls_vector_store_provider: str | None
"""Vector store provider."""
ls_embedding_provider: str | None
"""Embedding provider."""
ls_embedding_model: str | None
"""Embedding model."""
@@ -116,7 +119,9 @@ class BaseRetriever(RunnableSerializable[RetrieverInput, RetrieverOutput], ABC):
)
_new_arg_supported: bool = False
_expects_other_args: bool = False
tags: list[str] | None = None
"""Optional list of tags associated with the retriever.
@@ -126,6 +131,7 @@ class BaseRetriever(RunnableSerializable[RetrieverInput, RetrieverOutput], ABC):
You can use these to eg identify a specific instance of a retriever with its
use case.
"""
metadata: dict[str, Any] | None = None
"""Optional metadata associated with the retriever.