Class: AWSCDK::Lex::CfnBot::QnAKendraConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lex/cfn_bot.rb

Overview

Contains details about the configuration of the Amazon Kendra index used for the AMAZON.QnAIntent .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exact_response:, kendra_index:, query_filter_string_enabled:, query_filter_string: nil) ⇒ QnAKendraConfigurationProperty

Returns a new instance of QnAKendraConfigurationProperty.

Parameters:

  • exact_response (Boolean, AWSCDK::IResolvable)

    Specifies whether to return an exact response from the Amazon Kendra index or to let the Amazon Bedrock model you select generate a response based on the results.

  • kendra_index (String)

    The ARN of the Amazon Kendra index to use.

  • query_filter_string_enabled (Boolean, AWSCDK::IResolvable)

    Specifies whether to enable an Amazon Kendra filter string or not.

  • query_filter_string (String, nil) (defaults to: nil)

    Contains the Amazon Kendra filter string to use if enabled.



4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
# File 'lex/cfn_bot.rb', line 4734

def initialize(exact_response:, kendra_index:, query_filter_string_enabled:, query_filter_string: nil)
  @exact_response = exact_response
  Jsii::Type.check_type(@exact_response, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "exactResponse")
  @kendra_index = kendra_index
  Jsii::Type.check_type(@kendra_index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kendraIndex")
  @query_filter_string_enabled = query_filter_string_enabled
  Jsii::Type.check_type(@query_filter_string_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "queryFilterStringEnabled")
  @query_filter_string = query_filter_string
  Jsii::Type.check_type(@query_filter_string, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryFilterString") unless @query_filter_string.nil?
end

Instance Attribute Details

#exact_responseBoolean, AWSCDK::IResolvable (readonly)

Specifies whether to return an exact response from the Amazon Kendra index or to let the Amazon Bedrock model you select generate a response based on the results.

To use this feature, you must first add FAQ questions to your index by following the steps at Adding frequently asked questions (FAQs) to an index .



4751
4752
4753
# File 'lex/cfn_bot.rb', line 4751

def exact_response
  @exact_response
end

#kendra_indexString (readonly)

The ARN of the Amazon Kendra index to use.



4756
4757
4758
# File 'lex/cfn_bot.rb', line 4756

def kendra_index
  @kendra_index
end

#query_filter_stringString? (readonly)

Contains the Amazon Kendra filter string to use if enabled.

For more information on the Amazon Kendra search filter JSON format, see Using document attributes to filter search results .



4768
4769
4770
# File 'lex/cfn_bot.rb', line 4768

def query_filter_string
  @query_filter_string
end

#query_filter_string_enabledBoolean, AWSCDK::IResolvable (readonly)

Specifies whether to enable an Amazon Kendra filter string or not.



4761
4762
4763
# File 'lex/cfn_bot.rb', line 4761

def query_filter_string_enabled
  @query_filter_string_enabled
end

Class Method Details

.jsii_propertiesObject



4770
4771
4772
4773
4774
4775
4776
4777
# File 'lex/cfn_bot.rb', line 4770

def self.jsii_properties
  {
    :exact_response => "exactResponse",
    :kendra_index => "kendraIndex",
    :query_filter_string_enabled => "queryFilterStringEnabled",
    :query_filter_string => "queryFilterString",
  }
end

Instance Method Details

#to_jsiiObject



4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
# File 'lex/cfn_bot.rb', line 4779

def to_jsii
  result = {}
  result.merge!({
    "exactResponse" => @exact_response,
    "kendraIndex" => @kendra_index,
    "queryFilterStringEnabled" => @query_filter_string_enabled,
    "queryFilterString" => @query_filter_string,
  })
  result.compact
end