Home / Function/ test_strip_nested_like_think_tags() — langchain Function Reference

test_strip_nested_like_think_tags() — langchain Function Reference

Architecture documentation for the test_strip_nested_like_think_tags() function in test_output_parsers.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  be126a16_a71e_68f4_34b2_669030db003b["test_strip_nested_like_think_tags()"]
  e196f7b5_5f5c_a1ab_6284_a4fee37131df["TestStripThinkTags"]
  be126a16_a71e_68f4_34b2_669030db003b -->|defined in| e196f7b5_5f5c_a1ab_6284_a4fee37131df
  style be126a16_a71e_68f4_34b2_669030db003b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/perplexity/tests/unit_tests/test_output_parsers.py lines 31–37

    def test_strip_nested_like_think_tags(self) -> None:
        """Test stripping think tags that might appear nested."""
        text = "<think>outer <think>inner</think> still outer</think> result"
        result = strip_think_tags(text)
        # The function removes from first <think> to first </think>
        # then continues from after that </think>
        assert result == "still outer</think> result"

Domain

Subdomains

Frequently Asked Questions

What does test_strip_nested_like_think_tags() do?
test_strip_nested_like_think_tags() is a function in the langchain codebase, defined in libs/partners/perplexity/tests/unit_tests/test_output_parsers.py.
Where is test_strip_nested_like_think_tags() defined?
test_strip_nested_like_think_tags() is defined in libs/partners/perplexity/tests/unit_tests/test_output_parsers.py at line 31.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free