Home / Function/ test_get_buffer_string_xml_server_tool_call_args_truncation() — langchain Function Reference

test_get_buffer_string_xml_server_tool_call_args_truncation() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ffcd5fac_63bb_fec1_9ae1_10121d705140["test_get_buffer_string_xml_server_tool_call_args_truncation()"]
  03f6a5ae_d57a_eb66_626a_b9e082b763ea["test_utils.py"]
  ffcd5fac_63bb_fec1_9ae1_10121d705140 -->|defined in| 03f6a5ae_d57a_eb66_626a_b9e082b763ea
  style ffcd5fac_63bb_fec1_9ae1_10121d705140 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 2595–2613

def test_get_buffer_string_xml_server_tool_call_args_truncation() -> None:
    """Test that server_tool_call args are truncated to 500 chars."""
    long_value = "y" * 600
    messages: list[BaseMessage] = [
        AIMessage(
            content=[
                {
                    "type": "server_tool_call",
                    "id": "call_1",
                    "name": "test_tool",
                    "args": {"data": long_value},
                },
            ]
        ),
    ]
    result = get_buffer_string(messages, format="xml")
    assert "..." in result
    # The full 600-char value should not appear
    assert long_value not in result

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free