Class: Google::Cloud::AIPlatform::V1::SafetySetting
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::SafetySetting
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/aiplatform/v1/content.rb
Overview
Safety settings.
Defined Under Namespace
Modules: HarmBlockMethod, HarmBlockThreshold
Instance Attribute Summary collapse
-
#category ⇒ ::Google::Cloud::AIPlatform::V1::HarmCategory
Required.
-
#method ⇒ ::Google::Cloud::AIPlatform::V1::SafetySetting::HarmBlockMethod
Optional.
-
#threshold ⇒ ::Google::Cloud::AIPlatform::V1::SafetySetting::HarmBlockThreshold
Required.
Instance Attribute Details
#category ⇒ ::Google::Cloud::AIPlatform::V1::HarmCategory
Returns Required. Harm category.
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 330 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::AIPlatform::V1::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.
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 330 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::AIPlatform::V1::SafetySetting::HarmBlockThreshold
Returns Required. The harm block threshold.
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 330 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 |