Class: AWSCDK::Wisdom::CfnAIGuardrail::GuardrailContextualGroundingFilterConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wisdom/cfn_ai_guardrail.rb

Overview

A configuration for grounding filter.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(threshold:, type:) ⇒ GuardrailContextualGroundingFilterConfigProperty

Returns a new instance of GuardrailContextualGroundingFilterConfigProperty.

Parameters:

  • threshold (Numeric)

    The threshold for this filter.

  • type (String)

    The type of this filter.



912
913
914
915
916
917
# File 'wisdom/cfn_ai_guardrail.rb', line 912

def initialize(threshold:, type:)
  @threshold = threshold
  Jsii::Type.check_type(@threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "threshold")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
end

Instance Attribute Details

#thresholdNumeric (readonly)

Note:

Default: - 0

The threshold for this filter.



924
925
926
# File 'wisdom/cfn_ai_guardrail.rb', line 924

def threshold
  @threshold
end

#typeString (readonly)

The type of this filter.



929
930
931
# File 'wisdom/cfn_ai_guardrail.rb', line 929

def type
  @type
end

Class Method Details

.jsii_propertiesObject



931
932
933
934
935
936
# File 'wisdom/cfn_ai_guardrail.rb', line 931

def self.jsii_properties
  {
    :threshold => "threshold",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



938
939
940
941
942
943
944
945
# File 'wisdom/cfn_ai_guardrail.rb', line 938

def to_jsii
  result = {}
  result.merge!({
    "threshold" => @threshold,
    "type" => @type,
  })
  result.compact
end