Class CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.bedrock.CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDataSourcePropsMixin.ChunkingConfigurationProperty>
- Enclosing interface:
CfnDataSourcePropsMixin.ChunkingConfigurationProperty
@Stability(Stable)
public static final class CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDataSourcePropsMixin.ChunkingConfigurationProperty>
A builder for
CfnDataSourcePropsMixin.ChunkingConfigurationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.chunkingStrategy(String chunkingStrategy) fixedSizeChunkingConfiguration(CfnDataSourcePropsMixin.FixedSizeChunkingConfigurationProperty fixedSizeChunkingConfiguration) fixedSizeChunkingConfiguration(IResolvable fixedSizeChunkingConfiguration) hierarchicalChunkingConfiguration(CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty hierarchicalChunkingConfiguration) hierarchicalChunkingConfiguration(IResolvable hierarchicalChunkingConfiguration) semanticChunkingConfiguration(CfnDataSourcePropsMixin.SemanticChunkingConfigurationProperty semanticChunkingConfiguration) semanticChunkingConfiguration(IResolvable semanticChunkingConfiguration)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
chunkingStrategy
@Stability(Stable) public CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder chunkingStrategy(String chunkingStrategy) - Parameters:
chunkingStrategy- Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt forNONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.FIXED_SIZE– Amazon Bedrock splits your source data into chunks of the approximate size that you set in thefixedSizeChunkingConfiguration.HIERARCHICAL– Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.SEMANTIC– Split documents into chunks based on groups of similar content derived with natural language processing.NONE– Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
- Returns:
this
-
fixedSizeChunkingConfiguration
@Stability(Stable) public CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder fixedSizeChunkingConfiguration(IResolvable fixedSizeChunkingConfiguration) Sets the value ofCfnDataSourcePropsMixin.ChunkingConfigurationProperty.getFixedSizeChunkingConfiguration()- Parameters:
fixedSizeChunkingConfiguration- Configurations for when you choose fixed-size chunking. If you set thechunkingStrategyasNONE, exclude this field.- Returns:
this
-
fixedSizeChunkingConfiguration
@Stability(Stable) public CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder fixedSizeChunkingConfiguration(CfnDataSourcePropsMixin.FixedSizeChunkingConfigurationProperty fixedSizeChunkingConfiguration) Sets the value ofCfnDataSourcePropsMixin.ChunkingConfigurationProperty.getFixedSizeChunkingConfiguration()- Parameters:
fixedSizeChunkingConfiguration- Configurations for when you choose fixed-size chunking. If you set thechunkingStrategyasNONE, exclude this field.- Returns:
this
-
hierarchicalChunkingConfiguration
@Stability(Stable) public CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder hierarchicalChunkingConfiguration(IResolvable hierarchicalChunkingConfiguration) Sets the value ofCfnDataSourcePropsMixin.ChunkingConfigurationProperty.getHierarchicalChunkingConfiguration()- Parameters:
hierarchicalChunkingConfiguration- Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.- Returns:
this
-
hierarchicalChunkingConfiguration
@Stability(Stable) public CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder hierarchicalChunkingConfiguration(CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty hierarchicalChunkingConfiguration) Sets the value ofCfnDataSourcePropsMixin.ChunkingConfigurationProperty.getHierarchicalChunkingConfiguration()- Parameters:
hierarchicalChunkingConfiguration- Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.- Returns:
this
-
semanticChunkingConfiguration
@Stability(Stable) public CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder semanticChunkingConfiguration(IResolvable semanticChunkingConfiguration) Sets the value ofCfnDataSourcePropsMixin.ChunkingConfigurationProperty.getSemanticChunkingConfiguration()- Parameters:
semanticChunkingConfiguration- Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.- Returns:
this
-
semanticChunkingConfiguration
@Stability(Stable) public CfnDataSourcePropsMixin.ChunkingConfigurationProperty.Builder semanticChunkingConfiguration(CfnDataSourcePropsMixin.SemanticChunkingConfigurationProperty semanticChunkingConfiguration) Sets the value ofCfnDataSourcePropsMixin.ChunkingConfigurationProperty.getSemanticChunkingConfiguration()- Parameters:
semanticChunkingConfiguration- Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnDataSourcePropsMixin.ChunkingConfigurationProperty>- Returns:
- a new instance of
CfnDataSourcePropsMixin.ChunkingConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-