Interface GenerationConfiguration.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<GenerationConfiguration.Builder,
,GenerationConfiguration> SdkBuilder<GenerationConfiguration.Builder,
,GenerationConfiguration> SdkPojo
- Enclosing class:
GenerationConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionadditionalModelRequestFields
(Map<String, Document> additionalModelRequestFields) Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base.default GenerationConfiguration.Builder
guardrailConfiguration
(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) The configuration details for the guardrail.guardrailConfiguration
(GuardrailConfiguration guardrailConfiguration) The configuration details for the guardrail.default GenerationConfiguration.Builder
inferenceConfig
(Consumer<InferenceConfig.Builder> inferenceConfig) Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source.inferenceConfig
(InferenceConfig inferenceConfig) Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source.default GenerationConfiguration.Builder
performanceConfig
(Consumer<PerformanceConfiguration.Builder> performanceConfig) The latency configuration for the model.performanceConfig
(PerformanceConfiguration performanceConfig) The latency configuration for the model.default GenerationConfiguration.Builder
promptTemplate
(Consumer<PromptTemplate.Builder> promptTemplate) Contains the template for the prompt that's sent to the model for response generation.promptTemplate
(PromptTemplate promptTemplate) Contains the template for the prompt that's sent to the model for response generation.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
GenerationConfiguration.Builder additionalModelRequestFields(Map<String, Document> additionalModelRequestFields) Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows users to provide custom model parameters specific to the language model being used.
- Parameters:
additionalModelRequestFields
- Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows users to provide custom model parameters specific to the language model being used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfiguration
GenerationConfiguration.Builder guardrailConfiguration(GuardrailConfiguration guardrailConfiguration) The configuration details for the guardrail.
- Parameters:
guardrailConfiguration
- The configuration details for the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfiguration
default GenerationConfiguration.Builder guardrailConfiguration(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) The configuration details for the guardrail.
This is a convenience method that creates an instance of theGuardrailConfiguration.Builder
avoiding the need to create one manually viaGuardrailConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toguardrailConfiguration(GuardrailConfiguration)
.- Parameters:
guardrailConfiguration
- a consumer that will call methods onGuardrailConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
inferenceConfig
Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source.
- Parameters:
inferenceConfig
- Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inferenceConfig
default GenerationConfiguration.Builder inferenceConfig(Consumer<InferenceConfig.Builder> inferenceConfig) Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source.
This is a convenience method that creates an instance of theInferenceConfig.Builder
avoiding the need to create one manually viaInferenceConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinferenceConfig(InferenceConfig)
.- Parameters:
inferenceConfig
- a consumer that will call methods onInferenceConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
performanceConfig
The latency configuration for the model.
- Parameters:
performanceConfig
- The latency configuration for the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
performanceConfig
default GenerationConfiguration.Builder performanceConfig(Consumer<PerformanceConfiguration.Builder> performanceConfig) The latency configuration for the model.
This is a convenience method that creates an instance of thePerformanceConfiguration.Builder
avoiding the need to create one manually viaPerformanceConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toperformanceConfig(PerformanceConfiguration)
.- Parameters:
performanceConfig
- a consumer that will call methods onPerformanceConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
promptTemplate
Contains the template for the prompt that's sent to the model for response generation. Generation prompts must include the
$search_results$
variable. For more information, see Use placeholder variables in the user guide.- Parameters:
promptTemplate
- Contains the template for the prompt that's sent to the model for response generation. Generation prompts must include the$search_results$
variable. For more information, see Use placeholder variables in the user guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptTemplate
default GenerationConfiguration.Builder promptTemplate(Consumer<PromptTemplate.Builder> promptTemplate) Contains the template for the prompt that's sent to the model for response generation. Generation prompts must include the
This is a convenience method that creates an instance of the$search_results$
variable. For more information, see Use placeholder variables in the user guide.PromptTemplate.Builder
avoiding the need to create one manually viaPromptTemplate.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed topromptTemplate(PromptTemplate)
.- Parameters:
promptTemplate
- a consumer that will call methods onPromptTemplate.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-