Home / Function/ test_create_system_message_prompt_list_template() — langchain Function Reference

test_create_system_message_prompt_list_template() — langchain Function Reference

Architecture documentation for the test_create_system_message_prompt_list_template() function in test_chat.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  65f596d8_bcb0_d26b_6501_03cde8fca2a7["test_create_system_message_prompt_list_template()"]
  00c8bbe0_a31c_1ac8_487a_bfd5a9d6b117["test_chat.py"]
  65f596d8_bcb0_d26b_6501_03cde8fca2a7 -->|defined in| 00c8bbe0_a31c_1ac8_487a_bfd5a9d6b117
  style 65f596d8_bcb0_d26b_6501_03cde8fca2a7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_chat.py lines 128–153

def test_create_system_message_prompt_list_template() -> None:
    graph_creator_content1 = """
    This is the prompt for the first test:
    {variables}
    """
    graph_creator_content2 = """
    This is the prompt for the second test:
        {variables}
        """
    graph_analyst_template = SystemMessagePromptTemplate.from_template(
        template=[graph_creator_content1, graph_creator_content2],
        input_variables=["variables"],
    )
    assert graph_analyst_template.format(variables="foo") == SystemMessage(
        content=[
            {
                "type": "text",
                "text": "\n    This is the prompt for the first test:\n    foo\n    ",
            },
            {
                "type": "text",
                "text": "\n    This is the prompt for "
                "the second test:\n        foo\n        ",
            },
        ]
    )

Domain

Subdomains

Frequently Asked Questions

What does test_create_system_message_prompt_list_template() do?
test_create_system_message_prompt_list_template() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/prompts/test_chat.py.
Where is test_create_system_message_prompt_list_template() defined?
test_create_system_message_prompt_list_template() is defined in libs/core/tests/unit_tests/prompts/test_chat.py at line 128.

Analyze Your Own Codebase

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

Try Supermodel Free