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.



1103
1104
1105
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1103

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)


1079
1080
1081
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1079

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)


1085
1086
1087
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1085

def flagged
  @flagged
end

#influential_termsArray<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignalInfluentialTerm>

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



1091
1092
1093
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1091

def influential_terms
  @influential_terms
end

#rai_categoryString

The RAI category. Corresponds to the JSON property raiCategory

Returns:

  • (String)


1096
1097
1098
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1096

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)


1101
1102
1103
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1101

def score
  @score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1108
1109
1110
1111
1112
1113
1114
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1108

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