Home / Function/ test_prompt_with_template_variable_name_jinja2() — langchain Function Reference

test_prompt_with_template_variable_name_jinja2() — langchain Function Reference

Architecture documentation for the test_prompt_with_template_variable_name_jinja2() function in test_prompt.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  6fcaca4a_e0b3_03b5_faa2_f927a535c90a["test_prompt_with_template_variable_name_jinja2()"]
  af1b998b_a7bf_9d5c_32ef_bab507a6bee3["test_prompt.py"]
  6fcaca4a_e0b3_03b5_faa2_f927a535c90a -->|defined in| af1b998b_a7bf_9d5c_32ef_bab507a6bee3
  style 6fcaca4a_e0b3_03b5_faa2_f927a535c90a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_prompt.py lines 676–679

def test_prompt_with_template_variable_name_jinja2() -> None:
    template = "This is a {{template}} test."
    prompt = PromptTemplate.from_template(template, template_format="jinja2")
    assert prompt.invoke({"template": "bar"}).to_string() == "This is a bar test."

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free