Home / Function/ test_merge_message_runs_str_with_specified_separator() — langchain Function Reference

test_merge_message_runs_str_with_specified_separator() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 46–54

def test_merge_message_runs_str_with_specified_separator(
    msg_cls: type[BaseMessage],
) -> None:
    messages = [msg_cls("foo"), msg_cls("bar"), msg_cls("baz")]
    messages_model_copy = [m.model_copy(deep=True) for m in messages]
    expected = [msg_cls("foo<sep>bar<sep>baz")]
    actual = merge_message_runs(messages, chunk_separator="<sep>")
    assert actual == expected
    assert messages == messages_model_copy

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free