Skip to content
Prompty

ParserConfig

Template parser definition. kind is the @dispatch discriminator for the Parser seam, reached from a seam param as agent.template.parser.kind.

---
title: ParserConfig
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class ParserConfig {
        +string kind
        +dictionary options
    }
    class PromptyParser {
        +string kind
    }
    ParserConfig <|-- PromptyParser
    class CustomParser {
        +string kind
    }
    ParserConfig <|-- CustomParser
kind: prompty
options:
key: value
Name Type Description
kind string Parser used to process the rendered template into API-compatible format
options dictionary Options for the parser

The following types extend ParserConfig:

The following alternate constructions are available for ParserConfig. These allow for simplified creation of instances using a single property.

Simple construction with just a “kind” string

The following simplified representation can be used:

parser: "example"

This is equivalent to the full representation:

parser:
kind: "example"