Class: Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceRaiResult

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

The RAI results for a given text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CloudAiNlLlmProtoServiceRaiResult

Returns a new instance of CloudAiNlLlmProtoServiceRaiResult.



1066
1067
1068
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1066

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

Instance Attribute Details

#aida_recitation_resultGoogle::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoRecitationResult

The recitation result for one input Corresponds to the JSON property aidaRecitationResult



1008
1009
1010
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1008

def aida_recitation_result
  @aida_recitation_result
end

#blockedBoolean Also known as: blocked?

Use triggered_blocklist. Corresponds to the JSON property blocked

Returns:

  • (Boolean)


1013
1014
1015
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1013

def blocked
  @blocked
end

#error_codesArray<Fixnum>

The error codes indicate which RAI filters block the response. Corresponds to the JSON property errorCodes

Returns:

  • (Array<Fixnum>)


1019
1020
1021
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1019

def error_codes
  @error_codes
end

#filteredBoolean Also known as: filtered?

Whether the text should be filtered and not shown to the end user. This is determined based on a combination of triggered_recitation, triggered_blocklist, language_filter_result, and triggered_safety_filter. Corresponds to the JSON property filtered

Returns:

  • (Boolean)


1026
1027
1028
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1026

def filtered
  @filtered
end

#language_filter_resultGoogle::Apis::AiplatformV1beta1::LearningGenaiRootLanguageFilterResult

Language filter result from SAFT LangId. Corresponds to the JSON property languageFilterResult



1032
1033
1034
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1032

def language_filter_result
  @language_filter_result
end

#rai_signalsArray<Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceRaiSignal>

The RAI signals for the text. Corresponds to the JSON property raiSignals



1037
1038
1039
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1037

def rai_signals
  @rai_signals
end

#translation_request_infosArray<Google::Apis::AiplatformV1beta1::LearningGenaiRootTranslationRequestInfo>

Translation request info during RAI for debugging purpose. Each TranslationRequestInfo corresponds to a request sent to the translation server. Corresponds to the JSON property translationRequestInfos



1043
1044
1045
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1043

def translation_request_infos
  @translation_request_infos
end

#triggered_blocklistBoolean Also known as: triggered_blocklist?

Whether the text triggered the blocklist. Corresponds to the JSON property triggeredBlocklist

Returns:

  • (Boolean)


1048
1049
1050
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1048

def triggered_blocklist
  @triggered_blocklist
end

#triggered_recitationBoolean Also known as: triggered_recitation?

Whether the text should be blocked by the recitation result from Aida recitation checker. It is determined from aida_recitation_result. Corresponds to the JSON property triggeredRecitation

Returns:

  • (Boolean)


1055
1056
1057
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1055

def triggered_recitation
  @triggered_recitation
end

#triggered_safety_filterBoolean Also known as: triggered_safety_filter?

Whether the text triggered the safety filter. Currently, this is due to CSAI triggering or one of four categories (derogatory, sexual, toxic, violent) having a score over the filter threshold. Corresponds to the JSON property triggeredSafetyFilter

Returns:

  • (Boolean)


1063
1064
1065
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1063

def triggered_safety_filter
  @triggered_safety_filter
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1071

def update!(**args)
  @aida_recitation_result = args[:aida_recitation_result] if args.key?(:aida_recitation_result)
  @blocked = args[:blocked] if args.key?(:blocked)
  @error_codes = args[:error_codes] if args.key?(:error_codes)
  @filtered = args[:filtered] if args.key?(:filtered)
  @language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
  @rai_signals = args[:rai_signals] if args.key?(:rai_signals)
  @translation_request_infos = args[:translation_request_infos] if args.key?(:translation_request_infos)
  @triggered_blocklist = args[:triggered_blocklist] if args.key?(:triggered_blocklist)
  @triggered_recitation = args[:triggered_recitation] if args.key?(:triggered_recitation)
  @triggered_safety_filter = args[:triggered_safety_filter] if args.key?(:triggered_safety_filter)
end