Class CfnPrompt.ToolChoiceProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnPrompt.ToolChoiceProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnPrompt.ToolChoiceProperty>
- Enclosing interface:
CfnPrompt.ToolChoiceProperty
@Stability(Stable)
public static final class CfnPrompt.ToolChoiceProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnPrompt.ToolChoiceProperty>
A builder for
CfnPrompt.ToolChoiceProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnPrompt.ToolChoiceProperty.getAny()Sets the value ofCfnPrompt.ToolChoiceProperty.getAuto()build()Builds the configured instance.tool(IResolvable tool) Sets the value ofCfnPrompt.ToolChoiceProperty.getTool()Sets the value ofCfnPrompt.ToolChoiceProperty.getTool()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
any
Sets the value ofCfnPrompt.ToolChoiceProperty.getAny()- Parameters:
any- The model must request at least one tool (no text is generated).- Returns:
this
-
auto
Sets the value ofCfnPrompt.ToolChoiceProperty.getAuto()- Parameters:
auto- (Default). The Model automatically decides if a tool should be called or whether to generate text instead.- Returns:
this
-
tool
Sets the value ofCfnPrompt.ToolChoiceProperty.getTool()- Parameters:
tool- The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models.- Returns:
this
-
tool
@Stability(Stable) public CfnPrompt.ToolChoiceProperty.Builder tool(CfnPrompt.SpecificToolChoiceProperty tool) Sets the value ofCfnPrompt.ToolChoiceProperty.getTool()- Parameters:
tool- The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnPrompt.ToolChoiceProperty>- Returns:
- a new instance of
CfnPrompt.ToolChoiceProperty - Throws:
NullPointerException- if any required attribute was not provided
-