Skip to content

ModerationVerdict

Verdict returned by a ModerationFn.

Defined in: src/guardrails/moderation.ts:18

Verdict returned by a ModerationFn.

Properties

PropertyTypeDescriptionDefined in
categories?readonly string[]Violated categories, surfaced in the guardrail event metadata.src/guardrails/moderation.ts:22
flaggedbooleanWhether the text violates policy.src/guardrails/moderation.ts:20
score?numberConfidence or severity, surfaced in the guardrail event metadata.src/guardrails/moderation.ts:24
text?stringSanitized text to speak instead of the original. Remarks When present and non-empty on a flagged verdict, this is spoken and the utterance is not blocked — the escape hatch for classifiers that rewrite rather than reject. An empty string blocks the utterance instead.src/guardrails/moderation.ts:33

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency