langchain_core.prompts.string
.get_template_variables¶
- langchain_core.prompts.string.get_template_variables(template: str, template_format: str) List[str] [source]¶
Get the variables from the template.
- Parameters
template (str) – The template string.
template_format (str) – The template format. Should be one of “f-string” or “jinja2”.
- Returns
The variables from the template.
- Raises
ValueError – If the template format is not supported.
- Return type
List[str]