Home / Function/ __init__() — langchain Function Reference

__init__() — langchain Function Reference

Architecture documentation for the __init__() function in test_base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  af64fae8_ffd2_1a50_0289_f12710333cce["__init__()"]
  9621f65b_ca59_9097_eaa1_14cf6b8a0436["MockResponse"]
  af64fae8_ffd2_1a50_0289_f12710333cce -->|defined in| 9621f65b_ca59_9097_eaa1_14cf6b8a0436
  style af64fae8_ffd2_1a50_0289_f12710333cce fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/language_models/chat_models/test_base.py lines 1229–1241

    def __init__(
        self,
        status_code: int = 400,
        headers: dict[str, str] | None = None,
        json_data: dict[str, Any] | None = None,
        json_raises: type[Exception] | None = None,
        text_raises: type[Exception] | None = None,
    ):
        self.status_code = status_code
        self.headers = headers or {}
        self._json_data = json_data
        self._json_raises = json_raises
        self._text_raises = text_raises

Domain

Subdomains

Frequently Asked Questions

What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/chat_models/test_base.py.
Where is __init__() defined?
__init__() is defined in libs/core/tests/unit_tests/language_models/chat_models/test_base.py at line 1229.

Analyze Your Own Codebase

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

Try Supermodel Free