Class: Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal

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

An RAI signal for a single category.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CloudAiNlLlmProtoServiceRaiSignal

Returns a new instance of CloudAiNlLlmProtoServiceRaiSignal.



1035
1036
1037
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1035

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

Instance Attribute Details

#confidenceString

The confidence level for the RAI category. Corresponds to the JSON property confidence

Returns:

  • (String)


1016
1017
1018
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1016

def confidence
  @confidence
end

#flaggedBoolean Also known as: flagged?

Whether the category is flagged as being present. Currently, this is set to true if score >= 0.5. Corresponds to the JSON property flagged

Returns:

  • (Boolean)


1022
1023
1024
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1022

def flagged
  @flagged
end

#rai_categoryString

The RAI category. Corresponds to the JSON property raiCategory

Returns:

  • (String)


1028
1029
1030
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1028

def rai_category
  @rai_category
end

#scoreFloat

The score for the category, in the range [0.0, 1.0]. Corresponds to the JSON property score

Returns:

  • (Float)


1033
1034
1035
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1033

def score
  @score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1040
1041
1042
1043
1044
1045
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1040

def update!(**args)
  @confidence = args[:confidence] if args.key?(:confidence)
  @flagged = args[:flagged] if args.key?(:flagged)
  @rai_category = args[:rai_category] if args.key?(:rai_category)
  @score = args[:score] if args.key?(:score)
end