get_by_ids() — langchain Function Reference
Architecture documentation for the get_by_ids() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 69c47ec9_b976_3817_8224_27c4291cd4ba["get_by_ids()"] 6c336ac6_f55c_1ad7_6db3_73dbd71fb625["VectorStore"] 69c47ec9_b976_3817_8224_27c4291cd4ba -->|defined in| 6c336ac6_f55c_1ad7_6db3_73dbd71fb625 style 69c47ec9_b976_3817_8224_27c4291cd4ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/vectorstores/base.py lines 122–145
def get_by_ids(self, ids: Sequence[str], /) -> list[Document]:
"""Get documents by their IDs.
The returned documents are expected to have the ID field set to the ID of the
document in the vector store.
Fewer documents may be returned than requested if some IDs are not found or
if there are duplicated IDs.
Users should not assume that the order of the returned documents matches
the order of the input IDs. Instead, users should rely on the ID field of the
returned documents.
This method should **NOT** raise exceptions if no documents are found for
some IDs.
Args:
ids: List of IDs to retrieve.
Returns:
List of `Document` objects.
"""
msg = f"{self.__class__.__name__} does not yet support get_by_ids."
raise NotImplementedError(msg)
Domain
Subdomains
Source
Frequently Asked Questions
What does get_by_ids() do?
get_by_ids() is a function in the langchain codebase, defined in libs/core/langchain_core/vectorstores/base.py.
Where is get_by_ids() defined?
get_by_ids() is defined in libs/core/langchain_core/vectorstores/base.py at line 122.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free