Instructions to use suryatmodulus/rampart with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use suryatmodulus/rampart with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'suryatmodulus/rampart');
File size: 325 Bytes
8654436 | 1 2 3 4 5 6 7 8 9 10 11 12 | import { createGuard } from "../index.ts";
const guard = await createGuard();
const safe = await guard.protect("My name is Alex Rivera. My SSN is 472-81-0094.");
const reply = await llm(safe.text);
console.log(guard.reveal(reply));
async function llm(text: string): Promise<string> {
return "Got it, [GIVEN_NAME_1].";
} |