RedactionPattern
A named pattern and the text spoken in its place.
Defined in: src/guardrails/redaction.ts:28
A named pattern and the text spoken in its place.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
name | string | Label used in the guardrail.applied event metadata. | src/guardrails/redaction.ts:30 |
pattern | RegExp | Pattern to match. Must carry the global flag to redact every occurrence. | src/guardrails/redaction.ts:32 |
replacement? | string | (match) => string | Replacement for each match. Remarks Overrides the guardrail-level replacement. May be a function for context-sensitive substitutions (e.g. speaking only the last four digits). | src/guardrails/redaction.ts:40 |