Class CustomTopicProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.alpha.CustomTopicProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CustomTopicProps>
- Enclosing interface:
CustomTopicProps
@Stability(Experimental)
public static final class CustomTopicProps.Builder
extends Object
implements software.amazon.jsii.Builder<CustomTopicProps>
A builder for
CustomTopicProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.definition
(String definition) Sets the value ofCustomTopicProps.getDefinition()
Sets the value ofCustomTopicProps.getExamples()
inputAction
(GuardrailAction inputAction) Sets the value ofCustomTopicProps.getInputAction()
inputEnabled
(Boolean inputEnabled) Sets the value ofCustomTopicProps.getInputEnabled()
Sets the value ofCustomTopicProps.getName()
outputAction
(GuardrailAction outputAction) Sets the value ofCustomTopicProps.getOutputAction()
outputEnabled
(Boolean outputEnabled) Sets the value ofCustomTopicProps.getOutputEnabled()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
definition
Sets the value ofCustomTopicProps.getDefinition()
- Parameters:
definition
- Provide a clear definition to detect and block user inputs and FM responses that fall into this topic. This parameter is required. Avoid starting with "don't".- Returns:
this
-
examples
Sets the value ofCustomTopicProps.getExamples()
- Parameters:
examples
- Representative phrases that refer to the topic. This parameter is required. These phrases can represent a user input or a model response. Add between 1 and 100 phrases, up to 100 characters each.- Returns:
this
-
name
Sets the value ofCustomTopicProps.getName()
- Parameters:
name
- The name of the topic to deny. This parameter is required.- Returns:
this
-
inputAction
Sets the value ofCustomTopicProps.getInputAction()
- Parameters:
inputAction
- The action to take when a topic is detected in the input.- Returns:
this
-
inputEnabled
Sets the value ofCustomTopicProps.getInputEnabled()
- Parameters:
inputEnabled
- Whether the topic filter is enabled for input.- Returns:
this
-
outputAction
Sets the value ofCustomTopicProps.getOutputAction()
- Parameters:
outputAction
- The action to take when a topic is detected in the output.- Returns:
this
-
outputEnabled
Sets the value ofCustomTopicProps.getOutputEnabled()
- Parameters:
outputEnabled
- Whether the topic filter is enabled for output.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CustomTopicProps>
- Returns:
- a new instance of
CustomTopicProps
- Throws:
NullPointerException
- if any required attribute was not provided
-