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 {
      
        +Format format
        +Parser parser
    }
    class Format {
        +string kind
        +boolean strict
        +dictionary options
    }
    Template *-- Format
    class Parser {
        +string kind
        +dictionary options
    }
    Template *-- Parser
format:
kind: mustache
parser:
kind: mustache
NameTypeDescription
formatFormatTemplate rendering engine used for slot filling prompts (e.g., mustache, jinja2)
parserParserParser used to process the rendered template into API-compatible format

The following types are composed within Template: