__init__() — langchain Function Reference
Architecture documentation for the __init__() function in structured_output.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b6aaa613_5bca_34be_c082_689cacd3617e["__init__()"] 81c4b461_b90b_e57e_6c0f_02a237e01142["MultipleStructuredOutputsError"] b6aaa613_5bca_34be_c082_689cacd3617e -->|defined in| 81c4b461_b90b_e57e_6c0f_02a237e01142 style b6aaa613_5bca_34be_c082_689cacd3617e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/structured_output.py lines 44–57
def __init__(self, tool_names: list[str], ai_message: AIMessage) -> None:
"""Initialize `MultipleStructuredOutputsError`.
Args:
tool_names: The names of the tools called for structured output.
ai_message: The AI message that contained the invalid multiple tool calls.
"""
self.tool_names = tool_names
self.ai_message = ai_message
super().__init__(
"Model incorrectly returned multiple structured responses "
f"({', '.join(tool_names)}) when only one is expected."
)
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/structured_output.py.
Where is __init__() defined?
__init__() is defined in libs/langchain_v1/langchain/agents/structured_output.py at line 44.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free