Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchResponseSummarySafetyAttributes

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

Overview

Safety Attribute categories and their associated confidence scores.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1SearchResponseSummarySafetyAttributes

Returns a new instance of GoogleCloudDiscoveryengineV1SearchResponseSummarySafetyAttributes.



6853
6854
6855
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6853

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>)


6845
6846
6847
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6845

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>)


6851
6852
6853
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6851

def scores
  @scores
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6858
6859
6860
6861
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6858

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