Home / Function/ aget() — langchain Function Reference

aget() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/langchain_core/indexing/base.py lines 631–661

    async def aget(
        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.
        """
        return await run_in_executor(
            None,
            self.get,
            ids,
            **kwargs,
        )

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free