Package com.google.genai.types
Class SafetySetting
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SafetySetting
Safety settings.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SafetySetting.Builderbuilder()Instantiates a builder for SafetySetting.abstract Optional<HarmCategory>category()Required.static SafetySettingDeserializes a JSON string to a SafetySetting object.abstract Optional<HarmBlockMethod>method()Determines if the harm block method uses probability or probability and severity scores.abstract Optional<HarmBlockThreshold>Required.abstract SafetySetting.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
SafetySetting
public SafetySetting()
-
-
Method Details
-
method
Determines if the harm block method uses probability or probability and severity scores. -
category
Required. Harm category. -
threshold
Required. The harm block threshold. -
builder
Instantiates a builder for SafetySetting. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a SafetySetting object.
-