test_multiline_think_tags_with_structured_output() — langchain Function Reference
Architecture documentation for the test_multiline_think_tags_with_structured_output() function in test_output_parsers.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e2cc1dc9_3945_d13a_4ae1_6727f32c4503["test_multiline_think_tags_with_structured_output()"] 78e02bb9_2694_e9a5_aaa1_e8312a190104["TestReasoningStructuredOutputParser"] e2cc1dc9_3945_d13a_4ae1_6727f32c4503 -->|defined in| 78e02bb9_2694_e9a5_aaa1_e8312a190104 style e2cc1dc9_3945_d13a_4ae1_6727f32c4503 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/perplexity/tests/unit_tests/test_output_parsers.py lines 340–356
def test_multiline_think_tags_with_structured_output(self) -> None:
"""Test parsing structured output with multiline think tags."""
parser: ReasoningStructuredOutputParser[MockPerson] = (
ReasoningStructuredOutputParser(pydantic_object=MockPerson)
)
text = """<think>
Step 1: Consider the requirements
Step 2: Structure the data
Step 3: Format as JSON
</think>
{"name": "Bob Wilson", "age": 40, "email": "bob@example.com"}"""
generation = Generation(text=text)
result = parser.parse_result([generation])
assert isinstance(result, MockPerson)
assert result.name == "Bob Wilson"
assert result.age == 40
assert result.email == "bob@example.com"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_multiline_think_tags_with_structured_output() do?
test_multiline_think_tags_with_structured_output() is a function in the langchain codebase, defined in libs/partners/perplexity/tests/unit_tests/test_output_parsers.py.
Where is test_multiline_think_tags_with_structured_output() defined?
test_multiline_think_tags_with_structured_output() is defined in libs/partners/perplexity/tests/unit_tests/test_output_parsers.py at line 340.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free