Home / Function/ test_get_buffer_string_xml_reasoning_block() — langchain Function Reference

test_get_buffer_string_xml_reasoning_block() — langchain Function Reference

Architecture documentation for the test_get_buffer_string_xml_reasoning_block() function in test_utils.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  87120454_1ef4_4e62_ed06_96af99d31ce4["test_get_buffer_string_xml_reasoning_block()"]
  ea3f8d89_f44b_6738_3cb9_a740a73cfca4["test_utils.py"]
  87120454_1ef4_4e62_ed06_96af99d31ce4 -->|defined in| ea3f8d89_f44b_6738_3cb9_a740a73cfca4
  style 87120454_1ef4_4e62_ed06_96af99d31ce4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 2434–2446

def test_get_buffer_string_xml_reasoning_block() -> None:
    """Test XML format with reasoning content block."""
    messages: list[BaseMessage] = [
        AIMessage(
            content=[
                {"type": "reasoning", "reasoning": "Let me think about this..."},
                {"type": "text", "text": "The answer is 42."},
            ]
        ),
    ]
    result = get_buffer_string(messages, format="xml")
    assert "<reasoning>Let me think about this...</reasoning>" in result
    assert "The answer is 42." in result

Subdomains

Frequently Asked Questions

What does test_get_buffer_string_xml_reasoning_block() do?
test_get_buffer_string_xml_reasoning_block() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is test_get_buffer_string_xml_reasoning_block() defined?
test_get_buffer_string_xml_reasoning_block() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2434.

Analyze Your Own Codebase

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

Try Supermodel Free