FirebaseVertexAI Framework Reference

HarmCategory

@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public struct HarmCategory : CodableProtoEnum, Hashable, Sendable

Categories describing the potential harm a piece of content may pose.

  • Harassment content.

    Declaration

    Swift

    public static let harassment: HarmCategory
  • Negative or harmful comments targeting identity and/or protected attributes.

    Declaration

    Swift

    public static let hateSpeech: HarmCategory
  • Contains references to sexual acts or other lewd content.

    Declaration

    Swift

    public static let sexuallyExplicit: HarmCategory
  • Promotes or enables access to harmful goods, services, or activities.

    Declaration

    Swift

    public static let dangerousContent: HarmCategory
  • Content that may be used to harm civic integrity.

    Declaration

    Swift

    public static let civicIntegrity: HarmCategory
  • Returns the raw string representation of the HarmCategory value.

    Note

    This value directly corresponds to the values in the REST API.

    Declaration

    Swift

    public let rawValue: String