Skip to main content

Module prompt_safety

Module prompt_safety 

Source
Expand description

Content moderation, toxicity detection, and PII detection.

Structs§

ContentModerator
Content moderation engine.
PiiMatch
A detected PII match within the input text.
SafetyConfig
Configuration for the content moderator.
SafetyFilter
A safety filter that wraps a ContentModerator and supports an allow-list.
SafetyResult
Full result of a safety analysis.
SafetyScore
A score for a single safety category.

Enums§

SafetyCategory
Categories of unsafe content.