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 thetextInferenceConfigstructure for a knowledge base.default GenerationConfiguration.BuilderguardrailConfiguration(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) Contains configuration details for the guardrail.guardrailConfiguration(GuardrailConfiguration guardrailConfiguration) Contains configuration details for the guardrail.default GenerationConfiguration.BuilderkbInferenceConfig(Consumer<KbInferenceConfig.Builder> kbInferenceConfig) Contains configuration details for inference for knowledge base retrieval and response generation.kbInferenceConfig(KbInferenceConfig kbInferenceConfig) Contains configuration details for inference for knowledge base retrieval and response generation.default GenerationConfiguration.BuilderpromptTemplate(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
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
promptTemplate
Contains the template for the prompt that's sent to the model for response generation.
- Parameters:
promptTemplate- Contains the template for the prompt that's sent to the model for response generation.- 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.
This is a convenience method that creates an instance of thePromptTemplate.Builderavoiding the need to create one manually viaPromptTemplate.builder().When the
Consumercompletes,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:
-
guardrailConfiguration
GenerationConfiguration.Builder guardrailConfiguration(GuardrailConfiguration guardrailConfiguration) Contains configuration details for the guardrail.
- Parameters:
guardrailConfiguration- Contains 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) Contains configuration details for the guardrail.
This is a convenience method that creates an instance of theGuardrailConfiguration.Builderavoiding the need to create one manually viaGuardrailConfiguration.builder().When the
Consumercompletes,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:
-
kbInferenceConfig
Contains configuration details for inference for knowledge base retrieval and response generation.
- Parameters:
kbInferenceConfig- Contains configuration details for inference for knowledge base retrieval and response generation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
kbInferenceConfig
default GenerationConfiguration.Builder kbInferenceConfig(Consumer<KbInferenceConfig.Builder> kbInferenceConfig) Contains configuration details for inference for knowledge base retrieval and response generation.
This is a convenience method that creates an instance of theKbInferenceConfig.Builderavoiding the need to create one manually viaKbInferenceConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tokbInferenceConfig(KbInferenceConfig).- Parameters:
kbInferenceConfig- a consumer that will call methods onKbInferenceConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
additionalModelRequestFields
GenerationConfiguration.Builder additionalModelRequestFields(Map<String, Document> additionalModelRequestFields) Additional model parameters and corresponding values not included in the
textInferenceConfigstructure for a knowledge base. This allows you to provide custom model parameters specific to the language model being used.- Parameters:
additionalModelRequestFields- Additional model parameters and corresponding values not included in thetextInferenceConfigstructure for a knowledge base. This allows you 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.
-