Home / Function/ test_get_buffer_string_xml_text_plain_block() — langchain Function Reference

test_get_buffer_string_xml_text_plain_block() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 2449–2465

def test_get_buffer_string_xml_text_plain_block() -> None:
    """Test XML format with text-plain content block."""
    messages: list[BaseMessage] = [
        HumanMessage(
            content=[
                {"type": "text", "text": "Here is a document:"},
                {
                    "type": "text-plain",
                    "text": "Document content here.",
                    "mime_type": "text/plain",
                },
            ]
        ),
    ]
    result = get_buffer_string(messages, format="xml")
    assert "Here is a document:" in result
    assert "Document content here." in result

Subdomains

Frequently Asked Questions

What does test_get_buffer_string_xml_text_plain_block() do?
test_get_buffer_string_xml_text_plain_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_text_plain_block() defined?
test_get_buffer_string_xml_text_plain_block() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2449.

Analyze Your Own Codebase

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

Try Supermodel Free