Home / Function/ get() — langchain Function Reference

get() — langchain Function Reference

Architecture documentation for the get() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  141ac116_3ba9_4799_cd6e_c9626aca7b88["get()"]
  dee85009_1bbd_59e1_bb92_3ca6bbef9a2b["DocumentIndex"]
  141ac116_3ba9_4799_cd6e_c9626aca7b88 -->|defined in| dee85009_1bbd_59e1_bb92_3ca6bbef9a2b
  style 141ac116_3ba9_4799_cd6e_c9626aca7b88 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/indexing/base.py lines 605–629

    def get(
        self,
        ids: Sequence[str],
        /,
        **kwargs: Any,
    ) -> list[Document]:
        """Get documents by id.

        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 get.
            **kwargs: Additional keyword arguments. These are up to the implementation.

        Returns:
            List of documents that were found.
        """

Subdomains

Frequently Asked Questions

What does get() do?
get() is a function in the langchain codebase, defined in libs/core/langchain_core/indexing/base.py.
Where is get() defined?
get() is defined in libs/core/langchain_core/indexing/base.py at line 605.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free