_acall() — langchain Function Reference
Architecture documentation for the _acall() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 447ae41b_89ff_2a5a_8300_64cddd946b97["_acall()"] 741a7f73_f662_9d17_6b91_e7e8709f4338["MultiRouteChain"] 447ae41b_89ff_2a5a_8300_64cddd946b97 -->|defined in| 741a7f73_f662_9d17_6b91_e7e8709f4338 bd76877b_841c_bc52_2869_3c7d3fa3da4c["aroute()"] 447ae41b_89ff_2a5a_8300_64cddd946b97 -->|calls| bd76877b_841c_bc52_2869_3c7d3fa3da4c style 447ae41b_89ff_2a5a_8300_64cddd946b97 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/router/base.py lines 118–147
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()
callbacks = _run_manager.get_child()
route = await self.router_chain.aroute(inputs, callbacks=callbacks)
await _run_manager.on_text(
str(route.destination) + ": " + str(route.next_inputs),
verbose=self.verbose,
)
if not route.destination:
return await self.default_chain.acall(
route.next_inputs,
callbacks=callbacks,
)
if route.destination in self.destination_chains:
return await self.destination_chains[route.destination].acall(
route.next_inputs,
callbacks=callbacks,
)
if self.silent_errors:
return await self.default_chain.acall(
route.next_inputs,
callbacks=callbacks,
)
msg = f"Received invalid destination chain name '{route.destination}'"
raise ValueError(msg)
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does _acall() do?
_acall() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/router/base.py.
Where is _acall() defined?
_acall() is defined in libs/langchain/langchain_classic/chains/router/base.py at line 118.
What does _acall() call?
_acall() calls 1 function(s): aroute.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free