Class: AWSCDK::Bedrock::CfnKnowledgeBase::OpenSearchServerlessFieldMappingProperty

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

Overview

Contains the names of the fields to which to map information about the vector store.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata_field:, text_field:, vector_field:) ⇒ OpenSearchServerlessFieldMappingProperty

Returns a new instance of OpenSearchServerlessFieldMappingProperty.

Parameters:

  • metadata_field (String)

    The name of the field in which Amazon Bedrock stores metadata about the vector store.

  • text_field (String)

    The name of the field in which Amazon Bedrock stores the raw text from your data.

  • vector_field (String)

    The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.



1506
1507
1508
1509
1510
1511
1512
1513
# File 'bedrock/cfn_knowledge_base.rb', line 1506

def initialize(metadata_field:, text_field:, vector_field:)
  @metadata_field = 
  Jsii::Type.check_type(@metadata_field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metadataField")
  @text_field = text_field
  Jsii::Type.check_type(@text_field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "textField")
  @vector_field = vector_field
  Jsii::Type.check_type(@vector_field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vectorField")
end

Instance Attribute Details

#metadata_fieldString (readonly)

The name of the field in which Amazon Bedrock stores metadata about the vector store.



1519
1520
1521
# File 'bedrock/cfn_knowledge_base.rb', line 1519

def 
  @metadata_field
end

#text_fieldString (readonly)

The name of the field in which Amazon Bedrock stores the raw text from your data.

The text is split according to the chunking strategy you choose.



1526
1527
1528
# File 'bedrock/cfn_knowledge_base.rb', line 1526

def text_field
  @text_field
end

#vector_fieldString (readonly)

The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.



1531
1532
1533
# File 'bedrock/cfn_knowledge_base.rb', line 1531

def vector_field
  @vector_field
end

Class Method Details

.jsii_propertiesObject



1533
1534
1535
1536
1537
1538
1539
# File 'bedrock/cfn_knowledge_base.rb', line 1533

def self.jsii_properties
  {
    :metadata_field => "metadataField",
    :text_field => "textField",
    :vector_field => "vectorField",
  }
end

Instance Method Details

#to_jsiiObject



1541
1542
1543
1544
1545
1546
1547
1548
1549
# File 'bedrock/cfn_knowledge_base.rb', line 1541

def to_jsii
  result = {}
  result.merge!({
    "metadataField" => @metadata_field,
    "textField" => @text_field,
    "vectorField" => @vector_field,
  })
  result.compact
end