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:
- 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.
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
- (::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>) — Optional. Safety settings. This settings are effective only when the safety_spec.enable is true.
#safety_settings=
def safety_settings=(value) -> ::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>
Parameter
- value (::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>) — Optional. Safety settings. This settings are effective only when the safety_spec.enable is true.
Returns
- (::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec::SafetySetting>) — Optional. Safety settings. This settings are effective only when the safety_spec.enable is true.