Parameter Configuration (preview)

This feature is available from 2.2.0-beta-1 and currently in preview state and subject to change.

Common parameters for all parameter types are String name, String description, Boolean required, Boolean hidden and Object defaultValue. Additional parameters depend on the type of the parameter.

Parameter Type Description

string

Basic text parameter type. Supports all common parameters.

prompt

Special string type for AI model prompts. Usually used to render a HyperPrompt field in the UI.

number

Numeric parameter type. Supports all common parameters plus optional min and max values.

enum

Parameter with predefined options. Requires an additional enumValues array defining the available choices.

link

Special string type for handling URLs or resource links. Usually used to render a Link field in the UI. Requires an additional chooserId and workspace parameter.

boolean

True/false parameter type. Supports all common parameters with boolean values.

jsonObject

Complex parameter type for nested configurations in JSON format. The JSON schema is defined in the jsonSchema parameter. The jsonSchema can be used by UI to automatically create a from to manually fill parameters.

Example:

custom_image_size:
  $type: jsonObject
  jsonSchema: |
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "width": { "type": "integer" },
          "height": { "type": "integer" }
        },
          "required": ["width", "height"]
        },
      }

imageUrl

Special string type for handling image URLs. ImageUrl can either be a URL or a base64 encoded image.

base64encodedImage

Special string type for handling base64 encoded images.

list

A list of parameters. Use itemType to indicate the type of the list item type.

Example:

output:
  images:
    $type: list
    itemType: imageUrl

object

Complex parameter type for nested configurations. Supports all common parameters. This is used for complex input parameters without any specific type.

If the parameters is in JSON format please use the type jsonObject instead.

'switchable'

Special parameter type for handling switchable parameters. This can be used when a model or task accepts different types of input in the same parameter.

Below a more complex example where an image model allows to either use a preset (type enum) or custom value (type jsonObject):

 image_size:
   $type: switchable
   options:
     preset_image_size:
       $type: enum
       enumValues: [square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9]
     custom_image_size:
       $type: jsonObject
       jsonSchema: |
         {
           "$schema": "https://json-schema.org/draft/2020-12/schema",
             "type": "object",
             "properties": {
               "width": { "type": "integer" },
               "height": { "type": "integer" }
             },
             "required": ["width", "height"]
           },
         }
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the AI Accelerator module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules