Home / Function/ _call() — langchain Function Reference

_call() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  abc9a179_890c_9dd6_860e_e44c2d6232a4["_call()"]
  d5c05295_7d43_b6a9_48cf_46b920ada166["FakeListLLM"]
  abc9a179_890c_9dd6_860e_e44c2d6232a4 -->|defined in| d5c05295_7d43_b6a9_48cf_46b920ada166
  1c0efcea_9281_f25f_3a5c_c9311e24767e["_acall()"]
  1c0efcea_9281_f25f_3a5c_c9311e24767e -->|calls| abc9a179_890c_9dd6_860e_e44c2d6232a4
  style abc9a179_890c_9dd6_860e_e44c2d6232a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/test_agent.py lines 53–64

    def _call(
        self,
        prompt: str,
        stop: list[str] | None = None,
        run_manager: CallbackManagerForLLMRun | None = None,
        **kwargs: Any,
    ) -> str:
        """Increment counter, and then return response in that index."""
        self.i += 1
        print(f"=== Mock Response #{self.i} ===")  # noqa: T201
        print(self.responses[self.i])  # noqa: T201
        return self.responses[self.i]

Domain

Subdomains

Called By

Frequently Asked Questions

What does _call() do?
_call() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_agent.py.
Where is _call() defined?
_call() is defined in libs/langchain/tests/unit_tests/agents/test_agent.py at line 53.
What calls _call()?
_call() 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