Skip to content

Template

Template model for defining prompt templates.

This model specifies the rendering engine used for slot filling prompts, the parser used to process the rendered template into API-compatible format, and additional options for the template engine.

It allows for the creation of reusable templates that can be filled with dynamic data and processed to generate prompts for AI models.

---
title: Template
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class Template {
      
        +FormatConfig format
        +ParserConfig parser
    }
    class FormatConfig {
        +string kind
        +boolean strict
        +dictionary options
    }
    Template *-- FormatConfig
    class ParserConfig {
        +string kind
        +dictionary options
    }
    Template *-- ParserConfig
format:
kind: mustache
parser:
kind: mustache
NameTypeDescription
formatFormatConfigTemplate rendering engine used for slot filling prompts (e.g., mustache, jinja2)
parserParserConfigParser used to process the rendered template into API-compatible format

The following types are composed within Template: