Class: AWSCDK::Bedrock::CfnDataSource::VectorIngestionConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_data_source.rb

Overview

Contains details about how to ingest the documents in a data source.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chunking_configuration: nil, context_enrichment_configuration: nil, custom_transformation_configuration: nil, parsing_configuration: nil) ⇒ VectorIngestionConfigurationProperty

Returns a new instance of VectorIngestionConfigurationProperty.

Parameters:



2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
# File 'bedrock/cfn_data_source.rb', line 2494

def initialize(chunking_configuration: nil, context_enrichment_configuration: nil, custom_transformation_configuration: nil, parsing_configuration: nil)
  @chunking_configuration = chunking_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnDataSource::ChunkingConfigurationProperty.new(**chunking_configuration.transform_keys(&:to_sym)) : chunking_configuration
  Jsii::Type.check_type(@chunking_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkRhdGFTb3VyY2UuQ2h1bmtpbmdDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "chunkingConfiguration") unless @chunking_configuration.nil?
  @context_enrichment_configuration = context_enrichment_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnDataSource::ContextEnrichmentConfigurationProperty.new(**context_enrichment_configuration.transform_keys(&:to_sym)) : context_enrichment_configuration
  Jsii::Type.check_type(@context_enrichment_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkRhdGFTb3VyY2UuQ29udGV4dEVucmljaG1lbnRDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "contextEnrichmentConfiguration") unless @context_enrichment_configuration.nil?
  @custom_transformation_configuration = custom_transformation_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnDataSource::CustomTransformationConfigurationProperty.new(**custom_transformation_configuration.transform_keys(&:to_sym)) : custom_transformation_configuration
  Jsii::Type.check_type(@custom_transformation_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkRhdGFTb3VyY2UuQ3VzdG9tVHJhbnNmb3JtYXRpb25Db25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "customTransformationConfiguration") unless @custom_transformation_configuration.nil?
  @parsing_configuration = parsing_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnDataSource::ParsingConfigurationProperty.new(**parsing_configuration.transform_keys(&:to_sym)) : parsing_configuration
  Jsii::Type.check_type(@parsing_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkRhdGFTb3VyY2UuUGFyc2luZ0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "parsingConfiguration") unless @parsing_configuration.nil?
end

Instance Attribute Details

#chunking_configurationAWSCDK::IResolvable, ... (readonly)

Details about how to chunk the documents in the data source.

A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.



2511
2512
2513
# File 'bedrock/cfn_data_source.rb', line 2511

def chunking_configuration
  @chunking_configuration
end

#context_enrichment_configurationAWSCDK::IResolvable, ... (readonly)

The context enrichment configuration used for ingestion of the data into the vector store.



2516
2517
2518
# File 'bedrock/cfn_data_source.rb', line 2516

def context_enrichment_configuration
  @context_enrichment_configuration
end

#custom_transformation_configurationAWSCDK::IResolvable, ... (readonly)

A custom document transformer for parsed data source documents.



2521
2522
2523
# File 'bedrock/cfn_data_source.rb', line 2521

def custom_transformation_configuration
  @custom_transformation_configuration
end

#parsing_configurationAWSCDK::IResolvable, ... (readonly)

Configurations for a parser to use for parsing documents in your data source.

If you exclude this field, the default parser will be used.



2528
2529
2530
# File 'bedrock/cfn_data_source.rb', line 2528

def parsing_configuration
  @parsing_configuration
end

Class Method Details

.jsii_propertiesObject



2530
2531
2532
2533
2534
2535
2536
2537
# File 'bedrock/cfn_data_source.rb', line 2530

def self.jsii_properties
  {
    :chunking_configuration => "chunkingConfiguration",
    :context_enrichment_configuration => "contextEnrichmentConfiguration",
    :custom_transformation_configuration => "customTransformationConfiguration",
    :parsing_configuration => "parsingConfiguration",
  }
end

Instance Method Details

#to_jsiiObject



2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
# File 'bedrock/cfn_data_source.rb', line 2539

def to_jsii
  result = {}
  result.merge!({
    "chunkingConfiguration" => @chunking_configuration,
    "contextEnrichmentConfiguration" => @context_enrichment_configuration,
    "customTransformationConfiguration" => @custom_transformation_configuration,
    "parsingConfiguration" => @parsing_configuration,
  })
  result.compact
end