Class: Google::Cloud::Retail::V2::SafetySetting
- Inherits:
-
Object
- Object
- Google::Cloud::Retail::V2::SafetySetting
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/retail/v2/safety.rb
Overview
Safety settings.
Defined Under Namespace
Modules: HarmBlockMethod, HarmBlockThreshold
Instance Attribute Summary collapse
-
#category ⇒ ::Google::Cloud::Retail::V2::HarmCategory
Harm category.
-
#method ⇒ ::Google::Cloud::Retail::V2::SafetySetting::HarmBlockMethod
Optional.
-
#threshold ⇒ ::Google::Cloud::Retail::V2::SafetySetting::HarmBlockThreshold
The harm block threshold.
Instance Attribute Details
#category ⇒ ::Google::Cloud::Retail::V2::HarmCategory
Returns Harm category.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'proto_docs/google/cloud/retail/v2/safety.rb', line 35 class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end # Probability vs severity. module HarmBlockMethod # The harm block method is unspecified. HARM_BLOCK_METHOD_UNSPECIFIED = 0 # The harm block method uses both probability and severity scores. SEVERITY = 1 # The harm block method uses the probability score. PROBABILITY = 2 end end |
#method ⇒ ::Google::Cloud::Retail::V2::SafetySetting::HarmBlockMethod
Returns Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'proto_docs/google/cloud/retail/v2/safety.rb', line 35 class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end # Probability vs severity. module HarmBlockMethod # The harm block method is unspecified. HARM_BLOCK_METHOD_UNSPECIFIED = 0 # The harm block method uses both probability and severity scores. SEVERITY = 1 # The harm block method uses the probability score. PROBABILITY = 2 end end |
#threshold ⇒ ::Google::Cloud::Retail::V2::SafetySetting::HarmBlockThreshold
Returns The harm block threshold.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'proto_docs/google/cloud/retail/v2/safety.rb', line 35 class SafetySetting include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Probability based thresholds levels for blocking. module HarmBlockThreshold # Unspecified harm block threshold. HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 # Block low threshold and above (i.e. block more). BLOCK_LOW_AND_ABOVE = 1 # Block medium threshold and above. BLOCK_MEDIUM_AND_ABOVE = 2 # Block only high threshold (i.e. block less). BLOCK_ONLY_HIGH = 3 # Block none. BLOCK_NONE = 4 # Turn off the safety filter. OFF = 5 end # Probability vs severity. module HarmBlockMethod # The harm block method is unspecified. HARM_BLOCK_METHOD_UNSPECIFIED = 0 # The harm block method uses both probability and severity scores. SEVERITY = 1 # The harm block method uses the probability score. PROBABILITY = 2 end end |