check_valid_template#

langchain_core.prompts.string.check_valid_template(template: str, template_format: str, input_variables: List[str]) None[source]#

Check that template string is valid.

Parameters:
  • template (str) – The template string.

  • template_format (str) – The template format. Should be one of β€œf-string” or β€œjinja2”.

  • input_variables (List[str]) – The input variables.

Raises:
  • ValueError – If the template format is not supported.

  • ValueError – If the prompt schema is invalid.

Return type:

None