Home / Function/ _acall() — langchain Function Reference

_acall() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  c19f490d_78d9_035d_46c9_7f74bcf787a7["_acall()"]
  d01877d8_1123_f550_8a2f_0981eecde24e["SimpleSequentialChain"]
  c19f490d_78d9_035d_46c9_7f74bcf787a7 -->|defined in| d01877d8_1123_f550_8a2f_0981eecde24e
  6da6d25b_9115_3894_df2c_74202eb2c030["_acall()"]
  6da6d25b_9115_3894_df2c_74202eb2c030 -->|calls| c19f490d_78d9_035d_46c9_7f74bcf787a7
  6da6d25b_9115_3894_df2c_74202eb2c030["_acall()"]
  c19f490d_78d9_035d_46c9_7f74bcf787a7 -->|calls| 6da6d25b_9115_3894_df2c_74202eb2c030
  style c19f490d_78d9_035d_46c9_7f74bcf787a7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/sequential.py lines 187–208

    async def _acall(
        self,
        inputs: dict[str, Any],
        run_manager: AsyncCallbackManagerForChainRun | None = None,
    ) -> dict[str, Any]:
        _run_manager = run_manager or AsyncCallbackManagerForChainRun.get_noop_manager()
        _input = inputs[self.input_key]
        color_mapping = get_color_mapping([str(i) for i in range(len(self.chains))])
        for i, chain in enumerate(self.chains):
            _input = await chain.arun(
                _input,
                callbacks=_run_manager.get_child(f"step_{i + 1}"),
            )
            if self.strip_outputs:
                _input = _input.strip()
            await _run_manager.on_text(
                _input,
                color=color_mapping[str(i)],
                end="\n",
                verbose=self.verbose,
            )
        return {self.output_key: _input}

Subdomains

Calls

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free