Home / Function/ _acall() — langchain Function Reference

_acall() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  2d831240_3b27_26e3_8258_1a3051c28410["_acall()"]
  f3cef70e_11b0_61c9_7ec0_7308f4b45056["Chain"]
  2d831240_3b27_26e3_8258_1a3051c28410 -->|defined in| f3cef70e_11b0_61c9_7ec0_7308f4b45056
  3d0312e3_a4c5_8ae3_1487_fac6e14b7ae4["ainvoke()"]
  3d0312e3_a4c5_8ae3_1487_fac6e14b7ae4 -->|calls| 2d831240_3b27_26e3_8258_1a3051c28410
  style 2d831240_3b27_26e3_8258_1a3051c28410 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/base.py lines 340–366

    async def _acall(
        self,
        inputs: builtins.dict[str, Any],
        run_manager: AsyncCallbackManagerForChainRun | None = None,
    ) -> builtins.dict[str, Any]:
        """Asynchronously execute the chain.

        This is a private method that is not user-facing. It is only called within
            `Chain.acall`, which is the user-facing wrapper method that handles
            callbacks configuration and some input/output processing.

        Args:
            inputs: A dict of named inputs to the chain. Assumed to contain all inputs
                specified in `Chain.input_keys`, including any inputs added by memory.
            run_manager: The callbacks manager that contains the callback handlers for
                this run of the chain.

        Returns:
            A dict of named outputs. Should contain all outputs specified in
                `Chain.output_keys`.
        """
        return await run_in_executor(
            None,
            self._call,
            inputs,
            run_manager.get_sync() if run_manager else None,
        )

Subdomains

Called By

Frequently Asked Questions

What does _acall() do?
_acall() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/base.py.
Where is _acall() defined?
_acall() is defined in libs/langchain/langchain_classic/chains/base.py at line 340.
What calls _acall()?
_acall() is called by 1 function(s): ainvoke.

Analyze Your Own Codebase

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

Try Supermodel Free