Interface ConfigurablePromptOption
- All Superinterfaces:
InheritablePrompt
,PresettablePrompt<PromptOption>
,PromptOption
PromptOption
.
Please note that currently you can not overwrite the definition of inherited options,
use InheritablePrompt.isInherited()
and InheritablePrompt.getSourceType()
to check for the source of this option.
- Since:
- 5.2.241209
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.ai.dto.PromptOption
PromptOption.Builder
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull ConfigurablePromptOption
apply
(@NotNull PromptOption definition) Applies the definition of the given prompt option, which is the same as calling each setter individually.void
setItems
(@NotNull List<PromptOptionItem> items) Configures the list of items selectable in this option.void
Configures the name of the option to be shown.Methods inherited from interface de.espirit.firstspirit.ai.admin.InheritablePrompt
getSourceType, isInherited
Methods inherited from interface de.espirit.firstspirit.ai.admin.PresettablePrompt
getPreset, getPresetMode, restorePreset
Methods inherited from interface de.espirit.firstspirit.ai.dto.PromptOption
getId, getItems, getName
-
Method Details
-
setName
Configures the name of the option to be shown.Please note that currently you can not overwrite the definition of inherited options, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this option.- Parameters:
name
- The option name.- Throws:
UnsupportedOperationException
- if the option is inherited.- Since:
- 5.2.241209
-
setItems
Configures the list of items selectable in this option.Please note that currently you can not overwrite the definition of inherited options, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this option.- Parameters:
items
- The list of option items.- Throws:
UnsupportedOperationException
- if the option is inherited.- Since:
- 5.2.241209
-
apply
@Contract("_ -> this") @NotNull default @NotNull ConfigurablePromptOption apply(@NotNull @NotNull PromptOption definition) Applies the definition of the given prompt option, which is the same as calling each setter individually.Please note that currently you can not overwrite the definition of inherited options, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this option.- Parameters:
definition
- The option definition to initialize the configurable option with.- Returns:
- This instance.
- Throws:
UnsupportedOperationException
- if the option is inherited.- Since:
- 5.2.241209
-