has_structured_output() — langchain Function Reference
Architecture documentation for the has_structured_output() function in chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD ad25ec61_ad69_872a_a308_5c1ef92e0612["has_structured_output()"] 93a85b25_a139_159d_bcf5_03a6e2ed4dd3["ChatModelTests"] ad25ec61_ad69_872a_a308_5c1ef92e0612 -->|defined in| 93a85b25_a139_159d_bcf5_03a6e2ed4dd3 style ad25ec61_ad69_872a_a308_5c1ef92e0612 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/standard-tests/langchain_tests/unit_tests/chat_models.py lines 107–112
def has_structured_output(self) -> bool:
"""Whether the chat model supports structured output."""
return (
self.chat_model_class.with_structured_output
is not BaseChatModel.with_structured_output
) or self.has_tool_calling
Domain
Subdomains
Source
Frequently Asked Questions
What does has_structured_output() do?
has_structured_output() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/unit_tests/chat_models.py.
Where is has_structured_output() defined?
has_structured_output() is defined in libs/standard-tests/langchain_tests/unit_tests/chat_models.py at line 107.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free