Task Configuration (preview)

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

Task configuration enables you to define and customize AI-powered tasks in AI Accelerator. Tasks represent specific AI operations that can be performed using configured models, such as content generation, image creation, or text analysis.

Configuration

AI tasks can be added to your light module by creating an aiTasks folder and adding a <your-task>.yaml file with the following configuration:

taskName: <your-task-name> (1)
$type: <task-type> (2)
description: <task-description> (3)
model: <model-reference> (4)
inputParameters: (5)
  <parameter-name>:
    $type: <PARAMETER-TYPE>
    required: <true/false>
    description: <DESCRIPTION>
    defaultValue: <DEFAULT-VALUE>
outputParameters: <6> # This is currently not in use
  <parameter-name>:
    $type: <wd-TYPE>
    description: <DESCRIPTION>
1 The displayed name of the task in the UI (i.e. "Generate Product Description", "Create Hero Image", etc).
2 The type of task being configured (i.e. textToText, textToImage, imageToImage).
3 A description of what the task does, shown in the UI.
4 Reference to the model configuration that this task will use.
5 Input parameters that the task requires to execute.
6 Output parameters that define the structure of the task’s results. This is currently not used.

Available tasks

The current version of AI Accelerator supports the following tasks: executePromptTask, generateComponentTask and generateVariantTask

Execute Prompt Task

modelId: gpt-4o
$type: executePromptTask
inputParameters:
  prompt:
    $type: prompt
    required: true
    description: The prompt to generate an image from.
  locale:
    $type: string
    required: true

Component Generation Task

modelId: gpt-4o
$type: generateComponentTask
inputParameters:
  prompt:
    $type: prompt
    required: true
    description: The prompt to generate an image from.
  templateId:
    $type: string
    required: true
  locale:
    $type: string
    required: true

Variant Generation Task

modelId: gpt-4o
$type: generateVariantTask
inputParameters:
  prompt:
    $type: prompt
    required: true
    description: The prompt to generate an image from.
  component:
    $type: object
    required: true
  locale:
    $type: string
    required: true

Parameter Types

Tasks use the same parameter types as models. See Parameter Configuration for detailed information about available parameter types and their configurations.

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