Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes

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

Overview

Safety Attribute categories and their associated confidence scores.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes

Returns a new instance of GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes.



8473
8474
8475
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8473

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


8465
8466
8467
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8465

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


8471
8472
8473
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8471

def scores
  @scores
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8478
8479
8480
8481
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8478

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