Interface ExternalSourcesGenerationConfiguration.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<ExternalSourcesGenerationConfiguration.Builder,
,ExternalSourcesGenerationConfiguration> SdkBuilder<ExternalSourcesGenerationConfiguration.Builder,
,ExternalSourcesGenerationConfiguration> SdkPojo
- Enclosing class:
ExternalSourcesGenerationConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionadditionalModelRequestFields
(Map<String, Document> additionalModelRequestFields) Additional model parameters and their corresponding values not included in the text inference configuration for an external source.guardrailConfiguration
(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) Configuration details for the guardrail.guardrailConfiguration
(GuardrailConfiguration guardrailConfiguration) Configuration details for the guardrail.kbInferenceConfig
(Consumer<KbInferenceConfig.Builder> kbInferenceConfig) Configuration details for inference when usingRetrieveAndGenerate
to generate responses while using an external source.kbInferenceConfig
(KbInferenceConfig kbInferenceConfig) Configuration details for inference when usingRetrieveAndGenerate
to generate responses while using an external source.promptTemplate
(Consumer<PromptTemplate.Builder> promptTemplate) Contains the template for the prompt for the external source wrapper object.promptTemplate
(PromptTemplate promptTemplate) Contains the template for the prompt for the external source wrapper object.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
-
promptTemplate
Contains the template for the prompt for the external source wrapper object.
- Parameters:
promptTemplate
- Contains the template for the prompt for the external source wrapper object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptTemplate
default ExternalSourcesGenerationConfiguration.Builder promptTemplate(Consumer<PromptTemplate.Builder> promptTemplate) Contains the template for the prompt for the external source wrapper object.
This is a convenience method that creates an instance of thePromptTemplate.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:
-
guardrailConfiguration
ExternalSourcesGenerationConfiguration.Builder guardrailConfiguration(GuardrailConfiguration guardrailConfiguration) Configuration details for the guardrail.
- Parameters:
guardrailConfiguration
- Configuration details for the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfiguration
default ExternalSourcesGenerationConfiguration.Builder guardrailConfiguration(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) 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:
-
kbInferenceConfig
ExternalSourcesGenerationConfiguration.Builder kbInferenceConfig(KbInferenceConfig kbInferenceConfig) Configuration details for inference when using
RetrieveAndGenerate
to generate responses while using an external source.- Parameters:
kbInferenceConfig
- Configuration details for inference when usingRetrieveAndGenerate
to generate responses while using an external source.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
kbInferenceConfig
default ExternalSourcesGenerationConfiguration.Builder kbInferenceConfig(Consumer<KbInferenceConfig.Builder> kbInferenceConfig) Configuration details for inference when using
This is a convenience method that creates an instance of theRetrieveAndGenerate
to generate responses while using an external source.KbInferenceConfig.Builder
avoiding the need to create one manually viaKbInferenceConfig.builder()
.When the
Consumer
completes,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
ExternalSourcesGenerationConfiguration.Builder additionalModelRequestFields(Map<String, Document> additionalModelRequestFields) Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in custom model parameters specific to the language model being used.
- Parameters:
additionalModelRequestFields
- Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in 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.
-