Home / Function/ _call() — langchain Function Reference

_call() — langchain Function Reference

Architecture documentation for the _call() function in trajectory_eval_chain.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  e1f178f6_7558_62be_5f9e_904484841e62["_call()"]
  9066f65c_c5a3_1534_5336_72609f4ff02b["TrajectoryEvalChain"]
  e1f178f6_7558_62be_5f9e_904484841e62 -->|defined in| 9066f65c_c5a3_1534_5336_72609f4ff02b
  8614258b_8a81_eb94_7789_5188d33b6103["parse()"]
  e1f178f6_7558_62be_5f9e_904484841e62 -->|calls| 8614258b_8a81_eb94_7789_5188d33b6103
  style e1f178f6_7558_62be_5f9e_904484841e62 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_chain.py lines 280–302

    def _call(
        self,
        inputs: dict[str, str],
        run_manager: CallbackManagerForChainRun | None = None,
    ) -> dict[str, Any]:
        """Run the chain and generate the output.

        Args:
            inputs: The input values for the chain.
            run_manager: The callback manager for the chain run.

        Returns:
            The output values of the chain.
        """
        chain_input = {**inputs}
        if self.agent_tools:
            chain_input["tool_descriptions"] = self._tools_description
        _run_manager = run_manager or CallbackManagerForChainRun.get_noop_manager()
        raw_output = self.eval_chain.run(
            chain_input,
            callbacks=_run_manager.get_child(),
        )
        return cast("dict", self.output_parser.parse(raw_output))

Domain

Subdomains

Calls

Frequently Asked Questions

What does _call() do?
_call() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_chain.py.
Where is _call() defined?
_call() is defined in libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_chain.py at line 280.
What does _call() call?
_call() calls 1 function(s): parse.

Analyze Your Own Codebase

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

Try Supermodel Free