Home / Function/ test_get_buffer_string_xml_unicode_content() — langchain Function Reference

test_get_buffer_string_xml_unicode_content() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 1969–1980

def test_get_buffer_string_xml_unicode_content() -> None:
    """Test XML format with Unicode content."""
    messages = [
        HumanMessage(content="你好世界"),  # Chinese: Hello World
        AIMessage(content="こんにちは"),  # Japanese: Hello
    ]
    result = get_buffer_string(messages, format="xml")
    expected = (
        '<message type="human">你好世界</message>\n'
        '<message type="ai">こんにちは</message>'
    )
    assert result == expected

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free