CoolFace
Modelpublic

suryatmodulus/rampart

sourceHugging Facecc-by-4.0updated 3mo agoView on Hugging Face
1likes9downloads
basic-chat.ts12 linesDownload Raw Back to examples
1import { createGuard } from "../index.ts";2 3const guard = await createGuard();4 5const safe = await guard.protect("My name is Alex Rivera. My SSN is 472-81-0094.");6const reply = await llm(safe.text);7 8console.log(guard.reveal(reply));9 10async function llm(text: string): Promise<string> {11  return "Got it, [GIVEN_NAME_1].";12}