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.Builder
builder()
Instantiates a builder for SafetySetting.abstract Optional<HarmCategory>
category()
Required.static SafetySetting
Deserializes 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.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonString, 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.
-