Interface IPromptTextParameterDescriptorBuilder
public interface IPromptTextParameterDescriptorBuilder
Builder for the text parameters descriptor of a prompt query. Given a set of configured
text parameters, derives a suitable value descriptor. This will be a record value
descriptor with a field for each text parameter name.- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionallowPlaceholders(boolean allowPlaceholders) Sets whether to allow placeholder names in the text parameters.voidappendTo(IRecordValueDescriptorBuilder builder) Appends the properties to the given builder, using the current settings.IValueDescriptor<?, ?> build()Creates a new value descriptor with the current settings.builder()Creates a value descriptor builder, preconfigured with the current settings.textParameters(IPromptQueryConfig_TextParameters textParameters) Sets the text parameters configuration from which to derive the value descriptor.textParameters(List<PromptTextParameter> textParameters) Sets the text parameters from which to derive the value descriptor.
-
Method Details
-
allowPlaceholders
@CanIgnoreReturnValue IPromptTextParameterDescriptorBuilder allowPlaceholders(boolean allowPlaceholders) Sets whether to allow placeholder names in the text parameters. If true, the derived value descriptor will have the attributeVALUE_DESCRIPTOR_FC_PLACEHOLDERset to true. Defaults to true.- Parameters:
allowPlaceholders- Whether to allow placeholder names in the text parameters.- Returns:
- This builder for chaining method calls.
-
appendTo
Appends the properties to the given builder, using the current settings.- Parameters:
builder- The builder to append to.
-
build
IValueDescriptor<?,?> build()Creates a new value descriptor with the current settings.- Returns:
- A new value descriptor.
-
builder
IRecordValueDescriptorBuilder builder()Creates a value descriptor builder, preconfigured with the current settings. Useful if you want to further customize the descriptor.- Returns:
- A new value descriptor builder.
-
textParameters
@CanIgnoreReturnValue IPromptTextParameterDescriptorBuilder textParameters(IPromptQueryConfig_TextParameters textParameters) Sets the text parameters configuration from which to derive the value descriptor.- Parameters:
textParameters- The text parameters configuration.- Returns:
- This builder for chaining method calls.
-
textParameters
@CanIgnoreReturnValue IPromptTextParameterDescriptorBuilder textParameters(List<PromptTextParameter> textParameters) Sets the text parameters from which to derive the value descriptor.- Parameters:
textParameters- The text parameters.- Returns:
- This builder for chaining method calls.
-