Interface IPromptQueryConfig_Task


public interface IPromptQueryConfig_Task
Mixin for a prompt query configuration model that allows the user to select a type of task that the query should perform. For example, a prompt service might support different tasks such as "single text answer", "image generation" or "audio transcription". The user can select one of these tasks when configuring the prompt query; and each task might have different additional configuration settings.

This interface only uses an arbitrary string to identify the task. It is up to implementations to define which tasks are supported, and what their identifiers are. But see CommonPromptTask, which defines some common task names. When possible, prefer using these common task names to increase compatibility between different prompt service.

Use of this mixin is optional, but ensures a consistent name for the task property. When different prompt service handlers use the same property name, switching between different prompt service handlers preserves the configured data.

See also the <xp:task/> Faces component from the http://www.xima.de/taglib/xfc/prompt namespace, which provides a user interface for editing the data defined by this mixin.

Since:
8.5.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the task attribute.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the type of task that the prompt query should perform.
    void
    Sets the type of task that the prompt query should perform.
  • Field Details

    • ATTR_TASK

      static final String ATTR_TASK
      The name of the task attribute. If you implement a custom serialization / deserialization, use this name for the attribute to increase compatibility with other prompt service handlers.
      See Also:
  • Method Details

    • getTask

      String getTask()
      Gets the type of task that the prompt query should perform.
      Returns:
      The task type identifier.
    • setTask

      void setTask(String task)
      Sets the type of task that the prompt query should perform.
      Parameters:
      task - The task type identifier to set.