Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec

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 specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories.

  1. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec

Returns a new instance of GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec.



4797
4798
4799
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4797

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

Instance Attribute Details

#enableBoolean Also known as: enable?

Enable the safety filtering on the answer response. It is false by default. Corresponds to the JSON property enable

Returns:

  • (Boolean)


4788
4789
4790
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4788

def enable
  @enable
end

#safety_settingsArray<Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpecSafetySetting>

Optional. Safety settings. This settings are effective only when the safety_spec.enable is true. Corresponds to the JSON property safetySettings



4795
4796
4797
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4795

def safety_settings
  @safety_settings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4802
4803
4804
4805
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4802

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