Home / Function/ aroute() — langchain Function Reference

aroute() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  bd76877b_841c_bc52_2869_3c7d3fa3da4c["aroute()"]
  8c933306_16e9_7f72_a392_80e52d7a7371["RouterChain"]
  bd76877b_841c_bc52_2869_3c7d3fa3da4c -->|defined in| 8c933306_16e9_7f72_a392_80e52d7a7371
  447ae41b_89ff_2a5a_8300_64cddd946b97["_acall()"]
  447ae41b_89ff_2a5a_8300_64cddd946b97 -->|calls| bd76877b_841c_bc52_2869_3c7d3fa3da4c
  style bd76877b_841c_bc52_2869_3c7d3fa3da4c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/router/base.py lines 48–63

    async def aroute(
        self,
        inputs: dict[str, Any],
        callbacks: Callbacks = None,
    ) -> Route:
        """Route inputs to a destination chain.

        Args:
            inputs: inputs to the chain
            callbacks: callbacks to use for the chain

        Returns:
            a Route object
        """
        result = await self.acall(inputs, callbacks=callbacks)
        return Route(result["destination"], result["next_inputs"])

Subdomains

Called By

Frequently Asked Questions

What does aroute() do?
aroute() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/router/base.py.
Where is aroute() defined?
aroute() is defined in libs/langchain/langchain_classic/chains/router/base.py at line 48.
What calls aroute()?
aroute() 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