Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec (v2.1.0)

Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec.

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.
  2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#enable

def enable() -> ::Boolean
Returns
  • (::Boolean) — Enable the safety filtering on the answer response. It is false by default.

#enable=

def enable=(value) -> ::Boolean
Parameter
  • value (::Boolean) — Enable the safety filtering on the answer response. It is false by default.
Returns
  • (::Boolean) — Enable the safety filtering on the answer response. It is false by default.

#safety_settings

def safety_settings() -> ::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>
Returns

#safety_settings=

def safety_settings=(value) -> ::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>
Parameter
Returns