Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

Safety Attribute categories and their associated confidence scores.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes

Returns a new instance of GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes.



12466
12467
12468
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 12466

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

Instance Attribute Details

#categoriesArray<String>

The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. Corresponds to the JSON property categories

Returns:

  • (Array<String>)


12458
12459
12460
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 12458

def categories
  @categories
end

#scoresArray<Float>

The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. Corresponds to the JSON property scores

Returns:

  • (Array<Float>)


12464
12465
12466
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 12464

def scores
  @scores
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12471
12472
12473
12474
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 12471

def update!(**args)
  @categories = args[:categories] if args.key?(:categories)
  @scores = args[:scores] if args.key?(:scores)
end