Interface ConfigurablePromptOperation
- All Superinterfaces:
InheritablePrompt
,PresettablePrompt<PromptOperation>
,PromptOperation
PromptOperation
.
Please note that currently you can not overwrite the definition of inherited operations,
use InheritablePrompt.isInherited()
and InheritablePrompt.getSourceType()
to check for the source of this operation.
However, tags can be modified in each PromptConfiguration
individually, even for inherited operations.
- Since:
- 5.2.241209
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.ai.dto.PromptOperation
PromptOperation.Builder
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull ConfigurablePromptOperation
apply
(@NotNull PromptOperation definition) Applies the definition of the given prompt operation, which is the same as calling each setter individually.@Unmodifiable @NotNull Set<PromptOperationTagState>
Returns the configuration details for the tags specified locally as well as the inherited values.void
Configures the name to visualize the operation with.void
setOptions
(@NotNull List<UUID> options) Configures a list of option identifiers the operation is configurable with.void
Configures the prompt to build the generative AI request with.void
Configures the active state of the specified tag.void
Configures the tags explicitly for this operation.void
Configures the active tags associated with this operation.void
setTextRequired
(boolean textRequired) Configures whether the operation requires input text.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.PromptOperation
getId, getName, getOptions, getPrompt, getTags, isTextRequired
-
Method Details
-
setTags
Configures the active tags associated with this operation. Any other inherited but inactive tag will be explicitly disabled for this operation using this method.- Parameters:
tags
- The operation tags to be used.- Since:
- 5.2.241209
-
setTags
Configures the tags explicitly for this operation. Any tag not specified in the given map will be inherited automatically.- Parameters:
tags
- The tags to configure, withtrue
as active andfalse
as inactive.- Since:
- 5.2.241209
-
setTag
Configures the active state of the specified tag.- Parameters:
tag
- The tag to configure.active
-true
if active,false
if inactive,null
for default state (or inherited one)- Since:
- 5.2.241209
-
getTagStates
Returns the configuration details for the tags specified locally as well as the inherited values.- Returns:
- The tags for this operation as detailed state objects.
- Since:
- 5.2.241209
-
setName
Configures the name to visualize the operation with.Please note that currently you can not overwrite the definition of inherited operations, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this operation.- Parameters:
name
- The operation name.- Throws:
UnsupportedOperationException
- if the operation is inherited.- Since:
- 5.2.241209
-
setPrompt
Configures the prompt to build the generative AI request with.Please note that currently you can not overwrite the definition of inherited operations, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this operation.- Parameters:
prompt
- The operation prompt.- Throws:
UnsupportedOperationException
- if the operation is inherited.- Since:
- 5.2.241209
-
setTextRequired
void setTextRequired(boolean textRequired) Configures whether the operation requires input text.Please note that currently you can not overwrite the definition of inherited operations, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this operation.- Parameters:
textRequired
-true
if the operation requires input text,false
otherwise.- Throws:
UnsupportedOperationException
- if the operation is inherited.- Since:
- 5.2.241209
-
setOptions
Configures a list of option identifiers the operation is configurable with.Please note that currently you can not overwrite the definition of inherited operations, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this operation.- Parameters:
options
- The option identifiers of this operation.- Throws:
UnsupportedOperationException
- if the operation is inherited.- Since:
- 5.2.241209
-
apply
@Contract("_ -> this") @NotNull default @NotNull ConfigurablePromptOperation apply(@NotNull @NotNull PromptOperation definition) Applies the definition of the given prompt operation, which is the same as calling each setter individually.Please note that currently you can not overwrite the definition of inherited operations, use
InheritablePrompt.isInherited()
andInheritablePrompt.getSourceType()
to check for the source of this operation.- Parameters:
definition
- The definition to apply the settings from.- Returns:
- This instance.
- Throws:
UnsupportedOperationException
- if the operation is inherited.- Since:
- 5.2.241209
-