Interface PromptVariant.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<PromptVariant.Builder,
,PromptVariant> SdkBuilder<PromptVariant.Builder,
,PromptVariant> SdkPojo
- Enclosing class:
PromptVariant
-
Method Summary
Modifier and TypeMethodDescriptionadditionalModelRequestFields
(Document additionalModelRequestFields) Contains model-specific inference configurations that aren't in theinferenceConfiguration
field.default PromptVariant.Builder
genAiResource
(Consumer<PromptGenAiResource.Builder> genAiResource) Specifies a generative AI resource with which to use the prompt.genAiResource
(PromptGenAiResource genAiResource) Specifies a generative AI resource with which to use the prompt.default PromptVariant.Builder
inferenceConfiguration
(Consumer<PromptInferenceConfiguration.Builder> inferenceConfiguration) Contains inference configurations for the prompt variant.inferenceConfiguration
(PromptInferenceConfiguration inferenceConfiguration) Contains inference configurations for the prompt variant.metadata
(Collection<PromptMetadataEntry> metadata) An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.metadata
(Consumer<PromptMetadataEntry.Builder>... metadata) An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.metadata
(PromptMetadataEntry... metadata) An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.The unique identifier of the model or inference profile with which to run inference on the prompt.The name of the prompt variant.default PromptVariant.Builder
templateConfiguration
(Consumer<PromptTemplateConfiguration.Builder> templateConfiguration) Contains configurations for the prompt template.templateConfiguration
(PromptTemplateConfiguration templateConfiguration) Contains configurations for the prompt template.templateType
(String templateType) The type of prompt template to use.templateType
(PromptTemplateType templateType) The type of prompt template to use.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
additionalModelRequestFields
Contains model-specific inference configurations that aren't in the
inferenceConfiguration
field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models.- Parameters:
additionalModelRequestFields
- Contains model-specific inference configurations that aren't in theinferenceConfiguration
field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
genAiResource
Specifies a generative AI resource with which to use the prompt.
- Parameters:
genAiResource
- Specifies a generative AI resource with which to use the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
genAiResource
Specifies a generative AI resource with which to use the prompt.
This is a convenience method that creates an instance of thePromptGenAiResource.Builder
avoiding the need to create one manually viaPromptGenAiResource.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed togenAiResource(PromptGenAiResource)
.- Parameters:
genAiResource
- a consumer that will call methods onPromptGenAiResource.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
inferenceConfiguration
Contains inference configurations for the prompt variant.
- Parameters:
inferenceConfiguration
- Contains inference configurations for the prompt variant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inferenceConfiguration
default PromptVariant.Builder inferenceConfiguration(Consumer<PromptInferenceConfiguration.Builder> inferenceConfiguration) Contains inference configurations for the prompt variant.
This is a convenience method that creates an instance of thePromptInferenceConfiguration.Builder
avoiding the need to create one manually viaPromptInferenceConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinferenceConfiguration(PromptInferenceConfiguration)
.- Parameters:
inferenceConfiguration
- a consumer that will call methods onPromptInferenceConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
metadata
An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.
- Parameters:
metadata
- An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metadata
An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.
- Parameters:
metadata
- An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metadata
An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.
This is a convenience method that creates an instance of thePromptMetadataEntry.Builder
avoiding the need to create one manually viaPromptMetadataEntry.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tometadata(List<PromptMetadataEntry>)
.- Parameters:
metadata
- a consumer that will call methods onPromptMetadataEntry.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
modelId
The unique identifier of the model or inference profile with which to run inference on the prompt.
- Parameters:
modelId
- The unique identifier of the model or inference profile with which to run inference on the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
name
The name of the prompt variant.
- Parameters:
name
- The name of the prompt variant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
templateConfiguration
Contains configurations for the prompt template.
- Parameters:
templateConfiguration
- Contains configurations for the prompt template.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
templateConfiguration
default PromptVariant.Builder templateConfiguration(Consumer<PromptTemplateConfiguration.Builder> templateConfiguration) Contains configurations for the prompt template.
This is a convenience method that creates an instance of thePromptTemplateConfiguration.Builder
avoiding the need to create one manually viaPromptTemplateConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totemplateConfiguration(PromptTemplateConfiguration)
.- Parameters:
templateConfiguration
- a consumer that will call methods onPromptTemplateConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
templateType
The type of prompt template to use.
- Parameters:
templateType
- The type of prompt template to use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
templateType
The type of prompt template to use.
- Parameters:
templateType
- The type of prompt template to use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-