Documentation
¶
Overview ¶
Package redact scrubs text before it leaves the runtime or is fed back to the model: Secrets masks credential-like values, Clean additionally strips content that can be used to smuggle instructions (invisible characters, HTML comments, forged system tags).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
Clean prepares untrusted text for reuse as model context: it drops zero-width/invisible format characters, HTML comments and forged tags such as <system-reminder>...</system-reminder>, then applies Secrets. Order matters: invisible characters are removed first so they cannot split a tag or comment marker to dodge the later patterns.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.