Class SafetySetting
java.lang.Object
com.google.genai.gaos.models.interactions.SafetySetting
SafetySetting
A safety setting that affects the safety-blocking behavior.
A SafetySetting consists of a harm category and a threshold for that category.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSafetySetting(Method method, Threshold threshold, HarmCategory type) SafetySetting(Threshold threshold, HarmCategory type) -
Method Summary
Modifier and TypeMethodDescriptionstatic SafetySetting.Builderbuilder()booleaninthashCode()method()Optional.Required.toString()type()withMethod(Method method) Optional.withThreshold(Threshold threshold) Required.withType(HarmCategory type)
-
Constructor Details
-
SafetySetting
public SafetySetting(@Nullable Method method, @Nonnull Threshold threshold, @Nonnull HarmCategory type) -
SafetySetting
-
-
Method Details
-
method
Optional. The method for blocking content. If not specified, the default behavior is to use the probability score. -
threshold
Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. -
type
-
builder
-
withMethod
Optional. The method for blocking content. If not specified, the default behavior is to use the probability score. -
withThreshold
Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. -
withType
-
equals
-
hashCode
public int hashCode() -
toString
-