Home / Function/ _call() — langchain Function Reference

_call() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  d3515eaf_6765_8d34_0615_40c3ff4f20d0["_call()"]
  96e174c1_4107_a88b_8d98_3f22e5d7fb20["StringRunEvaluatorChain"]
  d3515eaf_6765_8d34_0615_40c3ff4f20d0 -->|defined in| 96e174c1_4107_a88b_8d98_3f22e5d7fb20
  2ca03f02_b9e1_8677_eda6_1008a8b4b7d4["_prepare_input()"]
  d3515eaf_6765_8d34_0615_40c3ff4f20d0 -->|calls| 2ca03f02_b9e1_8677_eda6_1008a8b4b7d4
  463340b6_4fd0_8a0a_5cee_c0ea5a3163a4["_prepare_output()"]
  d3515eaf_6765_8d34_0615_40c3ff4f20d0 -->|calls| 463340b6_4fd0_8a0a_5cee_c0ea5a3163a4
  style d3515eaf_6765_8d34_0615_40c3ff4f20d0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py lines 327–341

    def _call(
        self,
        inputs: dict[str, str],
        run_manager: CallbackManagerForChainRun | None = None,
    ) -> dict[str, Any]:
        """Call the evaluation chain."""
        evaluate_strings_inputs = self._prepare_input(inputs)
        _run_manager = run_manager or CallbackManagerForChainRun.get_noop_manager()
        callbacks = _run_manager.get_child()
        chain_output = self.string_evaluator.evaluate_strings(
            **evaluate_strings_inputs,
            callbacks=callbacks,
            include_run_info=True,
        )
        return self._prepare_output(chain_output)

Domain

Subdomains

Frequently Asked Questions

What does _call() do?
_call() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py.
Where is _call() defined?
_call() is defined in libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py at line 327.
What does _call() call?
_call() calls 2 function(s): _prepare_input, _prepare_output.

Analyze Your Own Codebase

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

Try Supermodel Free