Home / Function/ test_create_system_message_prompt_template_from_template_partial() — langchain Function Reference

test_create_system_message_prompt_template_from_template_partial() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_chat.py lines 110–125

def test_create_system_message_prompt_template_from_template_partial() -> None:
    """Create a system message prompt template with partials."""
    graph_creator_content = """
    Your instructions are:
    {instructions}
    History:
    {history}
    """
    graph_analyst_template = SystemMessagePromptTemplate.from_template(
        template=graph_creator_content,
        input_variables=["history"],
        partial_variables={"instructions": {}},
    )
    assert graph_analyst_template.format(history="history") == SystemMessage(
        content="\n    Your instructions are:\n    {}\n    History:\n    history\n    "
    )

Domain

Subdomains

Frequently Asked Questions

What does test_create_system_message_prompt_template_from_template_partial() do?
test_create_system_message_prompt_template_from_template_partial() 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_template_from_template_partial() defined?
test_create_system_message_prompt_template_from_template_partial() is defined in libs/core/tests/unit_tests/prompts/test_chat.py at line 110.

Analyze Your Own Codebase

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

Try Supermodel Free