Interface TopicFilterGuardrailConfig

Configuration for topic filtering

interface TopicFilterGuardrailConfig {
    allowedTopics?: string[];
    forbiddenTopics?: string[];
    topicKeywords?: Record<string, string[]>;
    severity?: GuardrailSeverity;
    minKeywordMatches?: number;
    enabled?: boolean;
}

Properties

allowedTopics?: string[]

List of allowed topics

forbiddenTopics?: string[]

List of forbidden topics

topicKeywords?: Record<string, string[]>

Keywords for each topic

severity?: GuardrailSeverity

Severity level for topic violations

minKeywordMatches?: number

Minimum keyword matches to classify a topic

enabled?: boolean

Whether to enable this guardrail