Class: AWSCDK::Wisdom::CfnKnowledgeBase::HierarchicalChunkingConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wisdom/cfn_knowledge_base.rb

Overview

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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(level_configurations:, overlap_tokens:) ⇒ HierarchicalChunkingConfigurationProperty

Returns a new instance of HierarchicalChunkingConfigurationProperty.

Parameters:



902
903
904
905
906
907
# File 'wisdom/cfn_knowledge_base.rb', line 902

def initialize(level_configurations:, overlap_tokens:)
  @level_configurations = level_configurations
  Jsii::Type.check_type(@level_configurations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2lzZG9tLkNmbktub3dsZWRnZUJhc2UuSGllcmFyY2hpY2FsQ2h1bmtpbmdMZXZlbENvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "levelConfigurations")
  @overlap_tokens = overlap_tokens
  Jsii::Type.check_type(@overlap_tokens, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "overlapTokens")
end

Instance Attribute Details

#overlap_tokensNumeric (readonly)

The number of tokens to repeat across chunks in the same layer.



918
919
920
# File 'wisdom/cfn_knowledge_base.rb', line 918

def overlap_tokens
  @overlap_tokens
end

Class Method Details

.jsii_propertiesObject



920
921
922
923
924
925
# File 'wisdom/cfn_knowledge_base.rb', line 920

def self.jsii_properties
  {
    :level_configurations => "levelConfigurations",
    :overlap_tokens => "overlapTokens",
  }
end

Instance Method Details

#to_jsiiObject



927
928
929
930
931
932
933
934
# File 'wisdom/cfn_knowledge_base.rb', line 927

def to_jsii
  result = {}
  result.merge!({
    "levelConfigurations" => @level_configurations,
    "overlapTokens" => @overlap_tokens,
  })
  result.compact
end