Class: AWSCDK::Wisdom::CfnKnowledgeBase::FixedSizeChunkingConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Wisdom::CfnKnowledgeBase::FixedSizeChunkingConfigurationProperty
- Defined in:
- wisdom/cfn_knowledge_base.rb
Overview
Configurations for when you choose fixed-size chunking.
If you set the chunking_strategy as NONE , exclude this field.
Instance Attribute Summary collapse
-
#max_tokens ⇒ Numeric
readonly
The maximum number of tokens to include in a chunk.
-
#overlap_percentage ⇒ Numeric
readonly
The percentage of overlap between adjacent chunks of a data source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_tokens:, overlap_percentage:) ⇒ FixedSizeChunkingConfigurationProperty
constructor
A new instance of FixedSizeChunkingConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_tokens:, overlap_percentage:) ⇒ FixedSizeChunkingConfigurationProperty
Returns a new instance of FixedSizeChunkingConfigurationProperty.
857 858 859 860 861 862 |
# File 'wisdom/cfn_knowledge_base.rb', line 857 def initialize(max_tokens:, overlap_percentage:) @max_tokens = max_tokens Jsii::Type.check_type(@max_tokens, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxTokens") @overlap_percentage = overlap_percentage Jsii::Type.check_type(@overlap_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "overlapPercentage") end |
Instance Attribute Details
#max_tokens ⇒ Numeric (readonly)
The maximum number of tokens to include in a chunk.
868 869 870 |
# File 'wisdom/cfn_knowledge_base.rb', line 868 def max_tokens @max_tokens end |
#overlap_percentage ⇒ Numeric (readonly)
The percentage of overlap between adjacent chunks of a data source.
873 874 875 |
# File 'wisdom/cfn_knowledge_base.rb', line 873 def overlap_percentage @overlap_percentage end |
Class Method Details
.jsii_properties ⇒ Object
875 876 877 878 879 880 |
# File 'wisdom/cfn_knowledge_base.rb', line 875 def self.jsii_properties { :max_tokens => "maxTokens", :overlap_percentage => "overlapPercentage", } end |
Instance Method Details
#to_jsii ⇒ Object
882 883 884 885 886 887 888 889 |
# File 'wisdom/cfn_knowledge_base.rb', line 882 def to_jsii result = {} result.merge!({ "maxTokens" => @max_tokens, "overlapPercentage" => @overlap_percentage, }) result.compact end |