__init__() — langchain Function Reference
Architecture documentation for the __init__() function in model_call_limit.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d7b54633_133e_d298_79a0_6d077bb6e8f2["__init__()"] 1f0a9f4b_a115_98f8_a756_a69fead7107d["ModelCallLimitExceededError"] d7b54633_133e_d298_79a0_6d077bb6e8f2 -->|defined in| 1f0a9f4b_a115_98f8_a756_a69fead7107d e2f72737_9375_a63d_9045_66bd6c4593f9["_build_limit_exceeded_message()"] d7b54633_133e_d298_79a0_6d077bb6e8f2 -->|calls| e2f72737_9375_a63d_9045_66bd6c4593f9 style d7b54633_133e_d298_79a0_6d077bb6e8f2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/middleware/model_call_limit.py lines 70–91
def __init__(
self,
thread_count: int,
run_count: int,
thread_limit: int | None,
run_limit: int | None,
) -> None:
"""Initialize the exception with call count information.
Args:
thread_count: Current thread model call count.
run_count: Current run model call count.
thread_limit: Thread model call limit (if set).
run_limit: Run model call limit (if set).
"""
self.thread_count = thread_count
self.run_count = run_count
self.thread_limit = thread_limit
self.run_limit = run_limit
msg = _build_limit_exceeded_message(thread_count, run_count, thread_limit, run_limit)
super().__init__(msg)
Domain
Subdomains
Source
Frequently Asked Questions
What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/model_call_limit.py.
Where is __init__() defined?
__init__() is defined in libs/langchain_v1/langchain/agents/middleware/model_call_limit.py at line 70.
What does __init__() call?
__init__() calls 1 function(s): _build_limit_exceeded_message.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free