Class: AWSCDK::Bedrock::CfnGuardrail::ContextualGroundingFilterConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnGuardrail::ContextualGroundingFilterConfigProperty
- Defined in:
- bedrock/cfn_guardrail.rb
Overview
The filter configuration details for the guardrails contextual grounding filter.
Instance Attribute Summary collapse
-
#action ⇒ String?
readonly
Specifies the action to take when content fails the contextual grounding evaluation.
-
#enabled ⇒ Boolean, ...
readonly
Specifies whether to enable contextual grounding evaluation.
-
#threshold ⇒ Numeric
readonly
The threshold details for the guardrails contextual grounding filter.
-
#type ⇒ String
readonly
The filter details for the guardrails contextual grounding filter.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(threshold:, type:, action: nil, enabled: nil) ⇒ ContextualGroundingFilterConfigProperty
constructor
A new instance of ContextualGroundingFilterConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(threshold:, type:, action: nil, enabled: nil) ⇒ ContextualGroundingFilterConfigProperty
Returns a new instance of ContextualGroundingFilterConfigProperty.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 |
# File 'bedrock/cfn_guardrail.rb', line 1021 def initialize(threshold:, type:, action: nil, enabled: nil) @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") @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") unless @action.nil? @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil? end |
Instance Attribute Details
#action ⇒ String? (readonly)
Specifies the action to take when content fails the contextual grounding evaluation. Supported values include:.
BLOCK– Block the content and replace it with blocked messaging.NONE– Take no action but return detection information in the trace response.
1049 1050 1051 |
# File 'bedrock/cfn_guardrail.rb', line 1049 def action @action end |
#enabled ⇒ Boolean, ... (readonly)
Specifies whether to enable contextual grounding evaluation.
When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.
1056 1057 1058 |
# File 'bedrock/cfn_guardrail.rb', line 1056 def enabled @enabled end |
#threshold ⇒ Numeric (readonly)
The threshold details for the guardrails contextual grounding filter.
1036 1037 1038 |
# File 'bedrock/cfn_guardrail.rb', line 1036 def threshold @threshold end |
#type ⇒ String (readonly)
The filter details for the guardrails contextual grounding filter.
1041 1042 1043 |
# File 'bedrock/cfn_guardrail.rb', line 1041 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'bedrock/cfn_guardrail.rb', line 1058 def self.jsii_properties { :threshold => "threshold", :type => "type", :action => "action", :enabled => "enabled", } end |
Instance Method Details
#to_jsii ⇒ Object
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 |
# File 'bedrock/cfn_guardrail.rb', line 1067 def to_jsii result = {} result.merge!({ "threshold" => @threshold, "type" => @type, "action" => @action, "enabled" => @enabled, }) result.compact end |