-
Notifications
You must be signed in to change notification settings - Fork 0
3. Getting Started
Hemantkohli1604 edited this page Apr 3, 2026
·
1 revision
## Install the package
npm install @intflows/genkit-guardThis library uses lightweight transformer models (MiniLM + BERT‑NER). Download them once.
## Download the transformer models (MiniLM + BERT‑NER)
node node_modules/@intflows/genkit-guard/scripts/download-model.js
Models are cached locally and reused across runs.
Paste this into your index.ts
import { guard, initGuard } from "@intflows/genkit-guard";
await initGuard();
const response = await ai.generate({
prompt: "How do I integrate with Azure Blob Storage?",
use: [
guard({
intent: {
mode: "semantic",
allowedIntent: "integration",
semantic: {
threshold: 0.7,
intents: {
integration: "Azure Blob, APIs, workflows"
}
}
},
pii: { reversible: true }
})
]
});