Class: AWSCDK::Wisdom::CfnKnowledgeBase::SemanticChunkingConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Wisdom::CfnKnowledgeBase::SemanticChunkingConfigurationProperty
- Defined in:
- wisdom/cfn_knowledge_base.rb
Overview
Settings for semantic document chunking for a data source.
Semantic chunking splits a document into smaller documents based on groups of similar content derived from the text with natural language processing.
Instance Attribute Summary collapse
-
#breakpoint_percentile_threshold ⇒ Numeric
readonly
The dissimilarity threshold for splitting chunks.
-
#buffer_size ⇒ Numeric
readonly
The buffer size.
-
#max_tokens ⇒ Numeric
readonly
The maximum number of tokens that a chunk can contain.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(breakpoint_percentile_threshold:, buffer_size:, max_tokens:) ⇒ SemanticChunkingConfigurationProperty
constructor
A new instance of SemanticChunkingConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(breakpoint_percentile_threshold:, buffer_size:, max_tokens:) ⇒ SemanticChunkingConfigurationProperty
Returns a new instance of SemanticChunkingConfigurationProperty.
1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'wisdom/cfn_knowledge_base.rb', line 1166 def initialize(breakpoint_percentile_threshold:, buffer_size:, max_tokens:) @breakpoint_percentile_threshold = breakpoint_percentile_threshold Jsii::Type.check_type(@breakpoint_percentile_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "breakpointPercentileThreshold") @buffer_size = buffer_size Jsii::Type.check_type(@buffer_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "bufferSize") @max_tokens = max_tokens Jsii::Type.check_type(@max_tokens, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxTokens") end |
Instance Attribute Details
#breakpoint_percentile_threshold ⇒ Numeric (readonly)
The dissimilarity threshold for splitting chunks.
1179 1180 1181 |
# File 'wisdom/cfn_knowledge_base.rb', line 1179 def breakpoint_percentile_threshold @breakpoint_percentile_threshold end |
#buffer_size ⇒ Numeric (readonly)
The buffer size.
1184 1185 1186 |
# File 'wisdom/cfn_knowledge_base.rb', line 1184 def buffer_size @buffer_size end |
#max_tokens ⇒ Numeric (readonly)
The maximum number of tokens that a chunk can contain.
1189 1190 1191 |
# File 'wisdom/cfn_knowledge_base.rb', line 1189 def max_tokens @max_tokens end |
Class Method Details
.jsii_properties ⇒ Object
1191 1192 1193 1194 1195 1196 1197 |
# File 'wisdom/cfn_knowledge_base.rb', line 1191 def self.jsii_properties { :breakpoint_percentile_threshold => "breakpointPercentileThreshold", :buffer_size => "bufferSize", :max_tokens => "maxTokens", } end |
Instance Method Details
#to_jsii ⇒ Object
1199 1200 1201 1202 1203 1204 1205 1206 1207 |
# File 'wisdom/cfn_knowledge_base.rb', line 1199 def to_jsii result = {} result.merge!({ "breakpointPercentileThreshold" => @breakpoint_percentile_threshold, "bufferSize" => @buffer_size, "maxTokens" => @max_tokens, }) result.compact end |