test__dict_message_prompt_template_fstring() — langchain Function Reference
Architecture documentation for the test__dict_message_prompt_template_fstring() function in test_dict.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8d7db7f2_4492_3954_bcab_fc5f0ec1ab04["test__dict_message_prompt_template_fstring()"] 0fed4acb_9f2e_b15c_0e09_781e9442823f["test_dict.py"] 8d7db7f2_4492_3954_bcab_fc5f0ec1ab04 -->|defined in| 0fed4acb_9f2e_b15c_0e09_781e9442823f style 8d7db7f2_4492_3954_bcab_fc5f0ec1ab04 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/prompts/test_dict.py lines 5–18
def test__dict_message_prompt_template_fstring() -> None:
template = {
"type": "text",
"text": "{text1}",
"cache_control": {"type": "{cache_type}"},
}
prompt = DictPromptTemplate(template=template, template_format="f-string")
expected = {
"type": "text",
"text": "important message",
"cache_control": {"type": "ephemeral"},
}
actual = prompt.format(text1="important message", cache_type="ephemeral")
assert actual == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test__dict_message_prompt_template_fstring() do?
test__dict_message_prompt_template_fstring() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/prompts/test_dict.py.
Where is test__dict_message_prompt_template_fstring() defined?
test__dict_message_prompt_template_fstring() is defined in libs/core/tests/unit_tests/prompts/test_dict.py at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free