test_nested_structured_output_strict() — langchain Function Reference
Architecture documentation for the test_nested_structured_output_strict() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 654f9a1b_9d03_6c0e_6ce1_f869f89b44a4["test_nested_structured_output_strict()"] 48232d20_f8c1_b597_14fa_7dc407e9bfe5["test_base.py"] 654f9a1b_9d03_6c0e_6ce1_f869f89b44a4 -->|defined in| 48232d20_f8c1_b597_14fa_7dc407e9bfe5 style 654f9a1b_9d03_6c0e_6ce1_f869f89b44a4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 1174–1190
def test_nested_structured_output_strict() -> None:
"""Test to verify structured output with strict=True for nested object."""
llm = ChatOpenAI(model="gpt-4o-2024-08-06")
class SelfEvaluation(TypedDict):
score: int
text: str
class JokeWithEvaluation(TypedDict):
"""Joke to tell user."""
setup: str
punchline: str
_evaluation: SelfEvaluation
llm.with_structured_output(JokeWithEvaluation, method="json_schema")
Domain
Subdomains
Source
Frequently Asked Questions
What does test_nested_structured_output_strict() do?
test_nested_structured_output_strict() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py.
Where is test_nested_structured_output_strict() defined?
test_nested_structured_output_strict() is defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py at line 1174.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free