FirebaseVertexAI Framework Reference

HarmBlockThreshold

public struct HarmBlockThreshold : EncodableProtoEnum, Sendable
extension SafetySetting.HarmBlockThreshold: Encodable

Block at and beyond a specified HarmProbability.

  • Content with .negligible will be allowed.

    Declaration

    Swift

    public static let blockLowAndAbove: SafetySetting.HarmBlockThreshold
  • Content with .negligible and .low will be allowed.

    Declaration

    Swift

    public static let blockMediumAndAbove: SafetySetting.HarmBlockThreshold
  • Content with .negligible, .low, and .medium will be allowed.

    Declaration

    Swift

    public static let blockOnlyHigh: SafetySetting.HarmBlockThreshold
  • All content will be allowed.

    Declaration

    Swift

    public static let blockNone: SafetySetting.HarmBlockThreshold
  • off

    Turn off the safety filter.

    Declaration

    Swift

    public static let off: SafetySetting.HarmBlockThreshold