Package de.espirit.firstspirit.ai.dto
Interface PromptOption.Builder
- Enclosing interface:
- PromptOption
public static interface PromptOption.Builder
A builder to create an option definition with.
- Since:
- 5.2.240903
-
Method Summary
Modifier and TypeMethodDescription@NotNull PromptOption.Builder
addItem
(@NotNull PromptOptionItem item) Adds another selectable item to this option.@NotNull PromptOption
Creates a new option definition based on the current configuration.@NotNull PromptOption.Builder
items
(@NotNull List<PromptOptionItem> items) Configures the selectable items of the option.@NotNull PromptOption.Builder
Configures the name of this option.
-
Method Details
-
name
Configures the name of this option.- Parameters:
name
- The option name.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
items
@Contract("_ -> this") @NotNull @NotNull PromptOption.Builder items(@NotNull @NotNull List<PromptOptionItem> items) Configures the selectable items of the option.- Parameters:
items
- The list option items.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
addItem
@Contract("_ -> this") @NotNull @NotNull PromptOption.Builder addItem(@NotNull @NotNull PromptOptionItem item) Adds another selectable item to this option.- Parameters:
item
- The option item to be added.- Returns:
- This builder instance.
- Since:
- 5.2.240903
-
create
Creates a new option definition based on the current configuration.- Parameters:
id
- The unique identifier of the option.- Returns:
- The resulting operation.
- Since:
- 5.2.240903
-