Package de.espirit.firstspirit.ai.dto
Interface PromptOperation.Builder
- Enclosing interface:
- PromptOperation
public static interface PromptOperation.Builder
A builder to create an operation definition with.
- Since:
- 5.2.240903
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull PromptOperation.Builder
addOption
(@NotNull PromptOption option) Adds an option the operation is configurable with.@NotNull PromptOperation.Builder
Adds an option as identifier the operation is configurable with.@NotNull PromptOperation
Creates a new operation definition based on the current configuration.@NotNull PromptOperation.Builder
Configures the name of this operation.@NotNull PromptOperation.Builder
Configures the options as list of identifiers the operation is configurable with.@NotNull PromptOperation.Builder
Configures the prompt text of this operation.@NotNull PromptOperation.Builder
Assigns tags to the operation.@NotNull PromptOperation.Builder
textRequired
(boolean textRequired) Configures whether input text is required to perform the operation.
-
Method Details
-
tags
@Contract("_ -> this") @NotNull @NotNull PromptOperation.Builder tags(@NotNull @NotNull Set<String> tags) Assigns tags to the operation.- Parameters:
tags
- The tags to be used.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
name
@Contract("_ -> this") @NotNull @NotNull PromptOperation.Builder name(@NotNull @NotNull String name) Configures the name of this operation.- Parameters:
name
- The operation name.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
prompt
@Contract("_ -> this") @NotNull @NotNull PromptOperation.Builder prompt(@NotNull @NotNull String prompt) Configures the prompt text of this operation.- Parameters:
prompt
- The operation prompt.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
textRequired
Configures whether input text is required to perform the operation.- Parameters:
textRequired
-true
if the operation requires input text,false
otherwise.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
options
@Contract("_ -> this") @NotNull @NotNull PromptOperation.Builder options(@NotNull @NotNull List<UUID> optionIds) Configures the options as list of identifiers the operation is configurable with.- Parameters:
optionIds
- The list of option identifiers.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
addOption
@Contract("_ -> this") @NotNull @NotNull PromptOperation.Builder addOption(@NotNull @NotNull UUID option) Adds an option as identifier the operation is configurable with.- Parameters:
option
- The option to be added.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
addOption
@Contract("_ -> this") @NotNull default @NotNull PromptOperation.Builder addOption(@NotNull @NotNull PromptOption option) Adds an option the operation is configurable with.- Parameters:
option
- The option to be added.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
create
Creates a new operation definition based on the current configuration.- Parameters:
id
- The unique identifier of the operation.- Returns:
- The resulting operation.
- Since:
- 5.2.240903
-