SafetySetting

public final class SafetySetting


A configuration for a BlockThreshold of some HarmCategory allowed and blocked in responses.

Summary

Public fields

final @NonNull HarmCategory

The relevant HarmCategory.

final @NonNull BlockThreshold

The threshold form harm allowable.

Public constructors

SafetySetting(
    @NonNull HarmCategory harmCategory,
    @NonNull BlockThreshold threshold
)

Public fields

harmCategory

public final @NonNull HarmCategory harmCategory

The relevant HarmCategory.

threshold

public final @NonNull BlockThreshold threshold

The threshold form harm allowable.

Public constructors

SafetySetting

public SafetySetting(
    @NonNull HarmCategory harmCategory,
    @NonNull BlockThreshold threshold
)
Parameters
@NonNull HarmCategory harmCategory

The relevant HarmCategory.

@NonNull BlockThreshold threshold

The threshold form harm allowable.