Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SafetyRating

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1SafetyRating

Returns a new instance of GoogleCloudAiplatformV1SafetyRating.



37218
37219
37220
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37218

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#blockedBoolean Also known as: blocked?

Output only. Indicates whether the content was blocked because of this rating. Corresponds to the JSON property blocked

Returns:

  • (Boolean)


37183
37184
37185
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37183

def blocked
  @blocked
end

#categoryString

Output only. The harm category of this rating. Corresponds to the JSON property category

Returns:

  • (String)


37189
37190
37191
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37189

def category
  @category
end

#overwritten_thresholdString

Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold. Corresponds to the JSON property overwrittenThreshold

Returns:

  • (String)


37196
37197
37198
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37196

def overwritten_threshold
  @overwritten_threshold
end

#probabilityString

Output only. The probability of harm for this category. Corresponds to the JSON property probability

Returns:

  • (String)


37201
37202
37203
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37201

def probability
  @probability
end

#probability_scoreFloat

Output only. The probability score of harm for this category. Corresponds to the JSON property probabilityScore

Returns:

  • (Float)


37206
37207
37208
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37206

def probability_score
  @probability_score
end

#severityString

Output only. The severity of harm for this category. Corresponds to the JSON property severity

Returns:

  • (String)


37211
37212
37213
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37211

def severity
  @severity
end

#severity_scoreFloat

Output only. The severity score of harm for this category. Corresponds to the JSON property severityScore

Returns:

  • (Float)


37216
37217
37218
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37216

def severity_score
  @severity_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



37223
37224
37225
37226
37227
37228
37229
37230
37231
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37223

def update!(**args)
  @blocked = args[:blocked] if args.key?(:blocked)
  @category = args[:category] if args.key?(:category)
  @overwritten_threshold = args[:overwritten_threshold] if args.key?(:overwritten_threshold)
  @probability = args[:probability] if args.key?(:probability)
  @probability_score = args[:probability_score] if args.key?(:probability_score)
  @severity = args[:severity] if args.key?(:severity)
  @severity_score = args[:severity_score] if args.key?(:severity_score)
end