Function: frameUntrustedEvidence()
frameUntrustedEvidence(
content,options?):FramedEvidence
Defined in: packages/agentos/src/safety/guardrails/untrustedEvidence.ts:47
Wraps content a person wrote between two markers that share a random boundary, so a model reads it as data.
Any copy of the boundary in the content is removed, null bytes are dropped, and chat-template tokens
(<|...|>, [INST], [/INST], <s>, </s>) are broken with a space, in the content and in the label's line.
Parameters
content
string
The text a person wrote.
options?
label: an id written on its own line above the opening marker. boundary: 8 to 64 letters or digits, for a test; 16 random hexadecimal characters otherwise.
boundary?
string
label?
string
Returns
The framed text and the boundary used.
Throws
TypeError for a boundary or a label of another shape.