test_get_buffer_string_with_mixed_content() — langchain Function Reference
Architecture documentation for the test_get_buffer_string_with_mixed_content() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 378f2871_5c9e_8b9c_2d74_92b7b6d82338["test_get_buffer_string_with_mixed_content()"] 03f6a5ae_d57a_eb66_626a_b9e082b763ea["test_utils.py"] 378f2871_5c9e_8b9c_2d74_92b7b6d82338 -->|defined in| 03f6a5ae_d57a_eb66_626a_b9e082b763ea style 378f2871_5c9e_8b9c_2d74_92b7b6d82338 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/test_utils.py lines 1707–1718
def test_get_buffer_string_with_mixed_content() -> None:
"""Test get_buffer_string with mixed content types in messages."""
messages = [
HumanMessage(content="Simple text"),
AIMessage(content=[{"type": "text", "text": "Structured text"}]),
SystemMessage(content=[{"type": "text", "text": "Another structured text"}]),
]
expected = (
"Human: Simple text\nAI: Structured text\nSystem: Another structured text"
)
actual = get_buffer_string(messages)
assert actual == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test_get_buffer_string_with_mixed_content() do?
test_get_buffer_string_with_mixed_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_with_mixed_content() defined?
test_get_buffer_string_with_mixed_content() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 1707.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free