Properties that control the moderations, for usages such as Hate and profanity (HAP) and Personal identifiable information (PII) filtering. This list can be extended with new types of moderations.

interface Moderations {
    hap?: WatsonXAI.ModerationHapProperties;
    input_ranges?: WatsonXAI.ModerationTextRange[];
    pii?: WatsonXAI.ModerationPiiProperties;
    [propName: string]: any;
}

Indexable

[propName: string]: any

Moderations accepts additional properties.

Properties

The properties specific to HAP.

If set, then only these ranges will be applied to the moderations. This is useful in the case that certain parts of the input text have already been checked.

The properties specific to PII.