Home / Function/ test_prompt_template_params() — langchain Function Reference

test_prompt_template_params() — langchain Function Reference

Architecture documentation for the test_prompt_template_params() function in test_runnable.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  0fc9475d_0fef_dae2_3836_3858c82a0021["test_prompt_template_params()"]
  26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"]
  0fc9475d_0fef_dae2_3836_3858c82a0021 -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5
  a3895c50_dab4_0c36_2d24_f63121e198a0["invoke()"]
  0fc9475d_0fef_dae2_3836_3858c82a0021 -->|calls| a3895c50_dab4_0c36_2d24_f63121e198a0
  style 0fc9475d_0fef_dae2_3836_3858c82a0021 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_runnable.py lines 1621–1636

def test_prompt_template_params() -> None:
    prompt = ChatPromptTemplate.from_template(
        "Respond to the following question: {question}"
    )
    result = prompt.invoke(
        {
            "question": "test",
            "topic": "test",
        }
    )
    assert result == ChatPromptValue(
        messages=[HumanMessage(content="Respond to the following question: test")]
    )

    with pytest.raises(KeyError):
        prompt.invoke({})

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_prompt_template_params() do?
test_prompt_template_params() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is test_prompt_template_params() defined?
test_prompt_template_params() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 1621.
What does test_prompt_template_params() call?
test_prompt_template_params() calls 1 function(s): invoke.

Analyze Your Own Codebase

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

Try Supermodel Free