Home / Function/ test_message_prompt_template_from_template_file() — langchain Function Reference

test_message_prompt_template_from_template_file() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_chat.py lines 178–189

def test_message_prompt_template_from_template_file() -> None:
    expected = ChatMessagePromptTemplate(
        prompt=PromptTemplate(
            template="Question: {question}\nAnswer:", input_variables=["question"]
        ),
        role="human",
    )
    actual = ChatMessagePromptTemplate.from_template_file(
        Path(__file__).parent.parent / "data" / "prompt_file.txt",
        role="human",
    )
    assert expected == actual

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free