Class ChatPromptVariantProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.alpha.ChatPromptVariantProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ChatPromptVariantProps>
- Enclosing interface:
ChatPromptVariantProps
@Stability(Experimental)
public static final class ChatPromptVariantProps.Builder
extends Object
implements software.amazon.jsii.Builder<ChatPromptVariantProps>
A builder for
ChatPromptVariantProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.inferenceConfiguration(PromptInferenceConfiguration inferenceConfiguration) Sets the value ofChatPromptVariantProps.getInferenceConfiguration()messages(List<? extends ChatMessage> messages) Sets the value ofChatPromptVariantProps.getMessages()model(IBedrockInvokable model) Sets the value ofCommonPromptVariantProps.getModel()promptVariables(List<String> promptVariables) Sets the value ofCommonPromptVariantProps.getPromptVariables()Sets the value ofChatPromptVariantProps.getSystem()toolConfiguration(ToolConfiguration toolConfiguration) Sets the value ofChatPromptVariantProps.getToolConfiguration()variantName(String variantName) Sets the value ofCommonPromptVariantProps.getVariantName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
messages
@Stability(Experimental) public ChatPromptVariantProps.Builder messages(List<? extends ChatMessage> messages) Sets the value ofChatPromptVariantProps.getMessages()- Parameters:
messages- The messages in the chat prompt. This parameter is required. Must include at least one User Message. The messages should alternate between User and Assistant.- Returns:
this
-
inferenceConfiguration
@Stability(Experimental) public ChatPromptVariantProps.Builder inferenceConfiguration(PromptInferenceConfiguration inferenceConfiguration) Sets the value ofChatPromptVariantProps.getInferenceConfiguration()- Parameters:
inferenceConfiguration- Inference configuration for the Chat Prompt.- Returns:
this
-
system
Sets the value ofChatPromptVariantProps.getSystem()- Parameters:
system- Context or instructions for the model to consider before generating a response.- Returns:
this
-
toolConfiguration
@Stability(Experimental) public ChatPromptVariantProps.Builder toolConfiguration(ToolConfiguration toolConfiguration) Sets the value ofChatPromptVariantProps.getToolConfiguration()- Parameters:
toolConfiguration- The configuration with available tools to the model and how it must use them.- Returns:
this
-
model
Sets the value ofCommonPromptVariantProps.getModel()- Parameters:
model- The model which is used to run the prompt. This parameter is required. The model could be a foundation model, a custom model, or a provisioned model.- Returns:
this
-
variantName
Sets the value ofCommonPromptVariantProps.getVariantName()- Parameters:
variantName- The name of the prompt variant. This parameter is required.- Returns:
this
-
promptVariables
@Stability(Experimental) public ChatPromptVariantProps.Builder promptVariables(List<String> promptVariables) Sets the value ofCommonPromptVariantProps.getPromptVariables()- Parameters:
promptVariables- The variables in the prompt template that can be filled in at runtime.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ChatPromptVariantProps>- Returns:
- a new instance of
ChatPromptVariantProps - Throws:
NullPointerException- if any required attribute was not provided
-