Skip to content

Property

Represents a single property

  • This model defines the structure of properties that can be used in prompts, including their type, description, whether they are required, and other attributes.
  • It allows for the definition of dynamic inputs that can be filled with data and processed to generate prompts for AI models.
---
title: Property
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class Property {
      
        +string name
        +string kind
        +string description
        +boolean required
        +unknown default
        +unknown example
        +unknown[] enumValues
    }
    class ArrayProperty {
        +string kind
        +Property items
    }
    Property <|-- ArrayProperty
    class ObjectProperty {
        +string kind
        +Property[] properties
    }
    Property <|-- ObjectProperty
name: my-input
kind: string
description: A description of the input property
required: true
default: default value
example: example value
enumValues:
- value1
- value2
- value3
NameTypeDescription
namestringName of the property
kindstringThe data type of the input property
descriptionstringA short description of the input property
requiredbooleanWhether the property is required
defaultunknownThe default value of the property - this represents the default value if none is provided
exampleunknownExample value used for either initialization or tooling
enumValuesunknown[]Allowed enumeration values for the property

The following types extend Property:

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

Simple construction with just a kind of boolean

The following simplified representation can be used:

input: true

This is equivalent to the full representation:

input:
kind: boolean
example: true

Simple construction with just a kind of float

The following simplified representation can be used:

input: 3.14

This is equivalent to the full representation:

input:
kind: float
example: 3.14

Simple construction with just a kind of integer

The following simplified representation can be used:

input: 5

This is equivalent to the full representation:

input:
kind: integer
example: 5

Simple construction with just a kind of string

The following simplified representation can be used:

input: "example"

This is equivalent to the full representation:

input:
kind: string
example: "example"