ModerationResult
data class ModerationResult(val isHarmful: Boolean, val categories: Map<ModerationCategory, ModerationCategoryResult>)(source)
Represents the result of a content moderation request.
Properties
Link copied to clipboard
A map of ModerationCategory objects to ModerationCategoryResult values indicating whether each category is flagged with metainformation about assessment.
Link copied to clipboard
A list of moderation categories that have been flagged as detected in the moderation result.
Functions
Link copied to clipboard
Checks if all the provided moderation categories are violated in this moderation result.
Link copied to clipboard
Checks if the specified moderation category is flagged as detected in the moderation result.
Link copied to clipboard
Evaluates whether the content violates any of the specified moderation categories.