Class: Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult
- 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
The RAI results for a given text.
Instance Attribute Summary collapse
-
#aida_recitation_result ⇒ Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoRecitationResult
The recitation result for one input Corresponds to the JSON property
aidaRecitationResult. -
#blocked ⇒ Boolean
(also: #blocked?)
Use
triggered_blocklist. -
#error_codes ⇒ Array<Fixnum>
The error codes indicate which RAI filters block the response.
-
#filtered ⇒ Boolean
(also: #filtered?)
Whether the text should be filtered and not shown to the end user.
-
#language_filter_result ⇒ Google::Apis::AiplatformV1::LearningGenaiRootLanguageFilterResult
Language filter result from SAFT LangId.
-
#rai_signals ⇒ Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal>
The RAI signals for the text.
-
#triggered_blocklist ⇒ Boolean
(also: #triggered_blocklist?)
Whether the text triggered the blocklist.
-
#triggered_recitation ⇒ Boolean
(also: #triggered_recitation?)
Whether the text should be blocked by the recitation result from Aida recitation checker.
-
#triggered_safety_filter ⇒ Boolean
(also: #triggered_safety_filter?)
Whether the text triggered the safety filter.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CloudAiNlLlmProtoServiceRaiResult
constructor
A new instance of CloudAiNlLlmProtoServiceRaiResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CloudAiNlLlmProtoServiceRaiResult
Returns a new instance of CloudAiNlLlmProtoServiceRaiResult.
997 998 999 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 997 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aida_recitation_result ⇒ Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoRecitationResult
The recitation result for one input
Corresponds to the JSON property aidaRecitationResult
945 946 947 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 945 def aida_recitation_result @aida_recitation_result end |
#blocked ⇒ Boolean Also known as: blocked?
Use triggered_blocklist.
Corresponds to the JSON property blocked
950 951 952 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 950 def blocked @blocked end |
#error_codes ⇒ Array<Fixnum>
The error codes indicate which RAI filters block the response.
Corresponds to the JSON property errorCodes
956 957 958 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 956 def error_codes @error_codes end |
#filtered ⇒ Boolean 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
963 964 965 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 963 def filtered @filtered end |
#language_filter_result ⇒ Google::Apis::AiplatformV1::LearningGenaiRootLanguageFilterResult
Language filter result from SAFT LangId.
Corresponds to the JSON property languageFilterResult
969 970 971 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 969 def language_filter_result @language_filter_result end |
#rai_signals ⇒ Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal>
The RAI signals for the text.
Corresponds to the JSON property raiSignals
974 975 976 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 974 def rai_signals @rai_signals end |
#triggered_blocklist ⇒ Boolean Also known as: triggered_blocklist?
Whether the text triggered the blocklist.
Corresponds to the JSON property triggeredBlocklist
979 980 981 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 979 def triggered_blocklist @triggered_blocklist end |
#triggered_recitation ⇒ Boolean 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
986 987 988 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 986 def triggered_recitation @triggered_recitation end |
#triggered_safety_filter ⇒ Boolean 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
994 995 996 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 994 def triggered_safety_filter @triggered_safety_filter end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 1002 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) @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 |