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
  f56f231b_b6eb_b4a1_5171_9aa21c13ee17["__call__()"]
  e9537ec5_dd39_fde8_64f7_e16f805b8dbe["StringExampleMapper"]
  f56f231b_b6eb_b4a1_5171_9aa21c13ee17 -->|defined in| e9537ec5_dd39_fde8_64f7_e16f805b8dbe
  b15ccccb_1344_8d38_767a_922bd0d352ca["map()"]
  f56f231b_b6eb_b4a1_5171_9aa21c13ee17 -->|calls| b15ccccb_1344_8d38_767a_922bd0d352ca
  18ce5ec1_b967_6417_c994_9209a57f1c14["map()"]
  f56f231b_b6eb_b4a1_5171_9aa21c13ee17 -->|calls| 18ce5ec1_b967_6417_c994_9209a57f1c14
  style f56f231b_b6eb_b4a1_5171_9aa21c13ee17 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py lines 267–272

    def __call__(self, example: Example) -> dict[str, str]:
        """Maps the Run and Example to a dictionary."""
        if not example.outputs:
            msg = f"Example {example.id} has no outputs to use as areference label."
            raise ValueError(msg)
        return self.map(example)

Domain

Subdomains

Calls

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 267.
What does __call__() call?
__call__() calls 2 function(s): map, map.

Analyze Your Own Codebase

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

Try Supermodel Free