Class: AWSCDK::Bedrock::CfnDataSource::FixedSizeChunkingConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_data_source.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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_tokens:, overlap_percentage:) ⇒ FixedSizeChunkingConfigurationProperty

Returns a new instance of FixedSizeChunkingConfigurationProperty.

Parameters:

  • max_tokens (Numeric)

    The maximum number of tokens to include in a chunk.

  • overlap_percentage (Numeric)

    The percentage of overlap between adjacent chunks of a data source.



1348
1349
1350
1351
1352
1353
# File 'bedrock/cfn_data_source.rb', line 1348

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_tokensNumeric (readonly)

The maximum number of tokens to include in a chunk.



1359
1360
1361
# File 'bedrock/cfn_data_source.rb', line 1359

def max_tokens
  @max_tokens
end

#overlap_percentageNumeric (readonly)

The percentage of overlap between adjacent chunks of a data source.



1364
1365
1366
# File 'bedrock/cfn_data_source.rb', line 1364

def overlap_percentage
  @overlap_percentage
end

Class Method Details

.jsii_propertiesObject



1366
1367
1368
1369
1370
1371
# File 'bedrock/cfn_data_source.rb', line 1366

def self.jsii_properties
  {
    :max_tokens => "maxTokens",
    :overlap_percentage => "overlapPercentage",
  }
end

Instance Method Details

#to_jsiiObject



1373
1374
1375
1376
1377
1378
1379
1380
# File 'bedrock/cfn_data_source.rb', line 1373

def to_jsii
  result = {}
  result.merge!({
    "maxTokens" => @max_tokens,
    "overlapPercentage" => @overlap_percentage,
  })
  result.compact
end