Class CommonPromptTask
- java.lang.Object
-
- de.xima.fc.prompt.service.support.CommonPromptTask
-
public final class CommonPromptTask extends Object
Enumeration for common types of prompt tasks. When configuring a prompt query, usually the first step is to choose a task type. Implementations are encouraged to use these constants to increase interoperability between different prompt service implementations, but are not required to do so.- Since:
- 8.5.0
- See Also:
IPromptQueryConfig_Task
-
-
Field Summary
Fields Modifier and Type Field Description static StringEDIT_IMAGEThe common name of the prompt task for editing images.static StringEDIT_VIDEOThe common name of the prompt task for editing or remixing videos.static StringGENERATE_IMAGEThe common name of the prompt task for generating images.static StringGENERATE_JSON_ANSWERThe common name of the prompt task for generating structured JSON answers in response to a prompt and/or files.static StringGENERATE_MUSICThe common name of the prompt task for generating music.static StringGENERATE_TEXT_ANSWERThe common name of the prompt task for generating free-text answers in response to a prompt and/or files.static StringGENERATE_VIDEOThe common name of the prompt task for generating videos.static StringMODERATE_CONTENTThe common name of the prompt task for moderating content, i.e. deciding whether text and / or files are appropriate according to some content policy.static StringSCALE_IMAGEThe common name of the prompt task for upscaling or downscaling images.static StringSYNTHESIZE_SPEECHThe common name of the prompt task for synthesizing speech from text.static StringTRANSCRIBE_SPEECHThe common name of the prompt task for transcribing speech to text.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IGuiIconicon(String commonPromptTask)Gets the icon for the given common prompt task.static StringlocalizedDescription(Locale locale, String commonPromptTask)Gets the localized description for the given common prompt task.static StringlocalizedLabel(Locale locale, String commonPromptTask)Gets the localized label for the given common prompt task.
-
-
-
Field Detail
-
EDIT_IMAGE
public static final String EDIT_IMAGE
The common name of the prompt task for editing images.- See Also:
- Constant Field Values
-
EDIT_VIDEO
public static final String EDIT_VIDEO
The common name of the prompt task for editing or remixing videos.- See Also:
- Constant Field Values
-
GENERATE_IMAGE
public static final String GENERATE_IMAGE
The common name of the prompt task for generating images.- See Also:
- Constant Field Values
-
GENERATE_JSON_ANSWER
public static final String GENERATE_JSON_ANSWER
The common name of the prompt task for generating structured JSON answers in response to a prompt and/or files.- See Also:
- Constant Field Values
-
GENERATE_MUSIC
public static final String GENERATE_MUSIC
The common name of the prompt task for generating music.- See Also:
- Constant Field Values
-
GENERATE_TEXT_ANSWER
public static final String GENERATE_TEXT_ANSWER
The common name of the prompt task for generating free-text answers in response to a prompt and/or files.- See Also:
- Constant Field Values
-
GENERATE_VIDEO
public static final String GENERATE_VIDEO
The common name of the prompt task for generating videos.- See Also:
- Constant Field Values
-
MODERATE_CONTENT
public static final String MODERATE_CONTENT
The common name of the prompt task for moderating content, i.e. deciding whether text and / or files are appropriate according to some content policy.- See Also:
- Constant Field Values
-
SCALE_IMAGE
public static final String SCALE_IMAGE
The common name of the prompt task for upscaling or downscaling images.- See Also:
- Constant Field Values
-
SYNTHESIZE_SPEECH
public static final String SYNTHESIZE_SPEECH
The common name of the prompt task for synthesizing speech from text.- See Also:
- Constant Field Values
-
TRANSCRIBE_SPEECH
public static final String TRANSCRIBE_SPEECH
The common name of the prompt task for transcribing speech to text.- See Also:
- Constant Field Values
-
-
Method Detail
-
icon
public static IGuiIcon icon(String commonPromptTask)
Gets the icon for the given common prompt task. The value should be one of the constants defined in this class. If any other value is given, returns an implementation-defined default icon.- Parameters:
commonPromptTask- The common prompt task constant, should be one of the constants defined in this class.- Returns:
- The icon for the given common prompt task.
-
localizedDescription
public static String localizedDescription(Locale locale, String commonPromptTask)
Gets the localized description for the given common prompt task. The value should be one of the constants defined in this class. When an unknown value is given, returns an implementation-defined default description.- Parameters:
locale- The locale for which to localize the description.commonPromptTask- The common prompt task constant, should be one of the constants defined in this class.- Returns:
- The localized description for the given common prompt task.
-
localizedLabel
public static String localizedLabel(Locale locale, String commonPromptTask)
Gets the localized label for the given common prompt task. The value should be one of the constants defined in this class. If any other value is given, returns an implementation-defined default label.- Parameters:
locale- The locale for which to localize the label.commonPromptTask- The common prompt task constant, should be one of the constants defined in this class.- Returns:
- The localized label for the given common prompt task.
-
-