Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback

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

Content filter results for a prompt sent in the request. Note: This is sent only in the first stream chunk and only if no candidates were generated due to content violations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback

Returns a new instance of GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback.



24415
24416
24417
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24415

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

Instance Attribute Details

#block_reasonString

Output only. The reason why the prompt was blocked. Corresponds to the JSON property blockReason

Returns:

  • (String)


24401
24402
24403
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24401

def block_reason
  @block_reason
end

#block_reason_messageString

Output only. A readable message that explains the reason why the prompt was blocked. Corresponds to the JSON property blockReasonMessage

Returns:

  • (String)


24407
24408
24409
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24407

def block_reason_message
  @block_reason_message
end

#safety_ratingsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SafetyRating>

Output only. A list of safety ratings for the prompt. There is one rating per category. Corresponds to the JSON property safetyRatings



24413
24414
24415
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24413

def safety_ratings
  @safety_ratings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24420
24421
24422
24423
24424
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24420

def update!(**args)
  @block_reason = args[:block_reason] if args.key?(:block_reason)
  @block_reason_message = args[:block_reason_message] if args.key?(:block_reason_message)
  @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
end