Class: Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceSafetyRating

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

Overview

Safety rating corresponding to the generated content.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CloudAiNlLlmProtoServiceSafetyRating

Returns a new instance of CloudAiNlLlmProtoServiceSafetyRating.



1207
1208
1209
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1207

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

Instance Attribute Details

#blockedBoolean Also known as: blocked?

Indicates whether the content was filtered out because of this rating. Corresponds to the JSON property blocked

Returns:

  • (Boolean)


1174
1175
1176
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1174

def blocked
  @blocked
end

#categoryString

Harm category. Corresponds to the JSON property category

Returns:

  • (String)


1180
1181
1182
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1180

def category
  @category
end

#influential_termsArray<Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm>

The influential terms that could potentially block the response. Corresponds to the JSON property influentialTerms



1185
1186
1187
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1185

def influential_terms
  @influential_terms
end

#probabilityString

Harm probability levels in the content. Corresponds to the JSON property probability

Returns:

  • (String)


1190
1191
1192
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1190

def probability
  @probability
end

#probability_scoreFloat

Harm probability score. Corresponds to the JSON property probabilityScore

Returns:

  • (Float)


1195
1196
1197
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1195

def probability_score
  @probability_score
end

#severityString

Harm severity levels in the content. Corresponds to the JSON property severity

Returns:

  • (String)


1200
1201
1202
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1200

def severity
  @severity
end

#severity_scoreFloat

Harm severity score. Corresponds to the JSON property severityScore

Returns:

  • (Float)


1205
1206
1207
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1205

def severity_score
  @severity_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1212
1213
1214
1215
1216
1217
1218
1219
1220
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1212

def update!(**args)
  @blocked = args[:blocked] if args.key?(:blocked)
  @category = args[:category] if args.key?(:category)
  @influential_terms = args[:influential_terms] if args.key?(:influential_terms)
  @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