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 ConfigurablePromptOperationapply(@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.voidsetAllowedTools(@NotNull List<AllowedTool> allowedTools) Configures the tools allowed to be used by this operation.voidConfigures the name to visualize the operation with.voidsetOptions(@NotNull List<UUID> options) Configures a list of option identifiers the operation is configurable with.voidConfigures the prompt to build the generative AI request with.voidConfigures the active state of the specified tag.voidConfigures the tags explicitly for this operation.voidConfigures the active tags associated with this operation.voidsetTextRequired(boolean textRequired) Configures whether the operation requires input text.Methods inherited from interface de.espirit.firstspirit.ai.admin.InheritablePrompt
getSourceType, isInheritedMethods inherited from interface de.espirit.firstspirit.ai.admin.PresettablePrompt
getPreset, getPresetMode, restorePresetMethods inherited from interface de.espirit.firstspirit.ai.dto.PromptOperation
getAllowedTools, 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, withtrueas active andfalseas inactive.- Since:
- 5.2.241209
-
setTag
Configures the active state of the specified tag.- Parameters:
tag- The tag to configure.active-trueif active,falseif inactive,nullfor 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-trueif the operation requires input text,falseotherwise.- 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
-
setAllowedTools
Configures the tools allowed to be used by this operation.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:
allowedTools- The allowed tools of this operation.- Throws:
UnsupportedOperationException- if the operation is inherited.- Since:
- 5.2.251104
-
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
-