Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec
- 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 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.
- when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.
Instance Attribute Summary collapse
-
#enable ⇒ Boolean
(also: #enable?)
Enable the safety filtering on the answer response.
-
#safety_settings ⇒ Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpecSafetySetting>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec
constructor
A new instance of GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec
Returns a new instance of GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec.
1379 1380 1381 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 1379 def initialize(**args) update!(**args) end |
Instance Attribute Details
#enable ⇒ Boolean Also known as: enable?
Enable the safety filtering on the answer response. It is false by default.
Corresponds to the JSON property enable
1370 1371 1372 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 1370 def enable @enable end |
#safety_settings ⇒ Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpecSafetySetting>
Optional. Safety settings. This settings are effective only when the
safety_spec.enable is true.
Corresponds to the JSON property safetySettings
1377 1378 1379 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 1377 def safety_settings @safety_settings end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1384 1385 1386 1387 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 1384 def update!(**args) @enable = args[:enable] if args.key?(:enable) @safety_settings = args[:safety_settings] if args.key?(:safety_settings) end |