ai-sdk-guardrails 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -2
- package/dist/chunk-CSUDFTRH.js +1067 -0
- package/dist/chunk-LVXHWHZC.js +355 -0
- package/dist/chunk-ND2ICBTR.js +1209 -0
- package/dist/chunk-VKJ5EAS7.js +397 -0
- package/dist/guardrails/input.cjs +1109 -0
- package/dist/guardrails/input.d.cts +133 -0
- package/dist/guardrails/input.d.ts +133 -0
- package/dist/guardrails/input.js +37 -0
- package/dist/guardrails/output.cjs +1260 -0
- package/dist/guardrails/output.d.cts +100 -0
- package/dist/guardrails/output.d.ts +100 -0
- package/dist/guardrails/output.js +55 -0
- package/dist/guardrails/tools.cjs +658 -0
- package/dist/guardrails/tools.d.cts +60 -0
- package/dist/guardrails/tools.d.ts +60 -0
- package/dist/guardrails/tools.js +10 -0
- package/dist/index.cjs +6046 -0
- package/dist/index.d.cts +1043 -0
- package/dist/index.d.ts +1043 -0
- package/dist/index.js +3063 -0
- package/dist/types-CeZi2BBN.d.cts +727 -0
- package/dist/types-CeZi2BBN.d.ts +727 -0
- package/package.json +30 -21
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AI SDK Guardrails
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Safety and quality controls for Vercel AI SDK
|
|
4
4
|
|
|
5
5
|
Add guardrails to your AI applications in one line of code. Block PII, prevent prompt injection, enforce output quality - while keeping your existing telemetry and observability stack intact.
|
|
6
6
|
|
|
@@ -35,6 +35,25 @@ await generateText({ model: safeModel, prompt: '...' });
|
|
|
35
35
|
npm install ai-sdk-guardrails
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
## 🧙♂️ No-Code Wizard (New!)
|
|
39
|
+
|
|
40
|
+
**Don't want to write code?** Use our visual wizard to configure guardrails:
|
|
41
|
+
|
|
42
|
+
1. **Open the wizard**: [wizard-prototype/index.html](./wizard-prototype/index.html)
|
|
43
|
+
2. **Choose your use case**: Content moderation, data protection, quality assurance, or security
|
|
44
|
+
3. **Select guardrails**: Pick from 40+ built-in guardrails
|
|
45
|
+
4. **Configure settings**: Adjust thresholds and parameters with sliders and toggles
|
|
46
|
+
5. **Copy generated code**: Get production-ready TypeScript code instantly
|
|
47
|
+
|
|
48
|
+
**Perfect for:**
|
|
49
|
+
|
|
50
|
+
- 🎯 **Non-technical users** who need AI safety
|
|
51
|
+
- 🚀 **Quick prototyping** of guardrail configurations
|
|
52
|
+
- 📚 **Learning** how to use the library
|
|
53
|
+
- 👥 **Team onboarding** and training
|
|
54
|
+
|
|
55
|
+
The wizard generates code that works out of the box - just copy, paste, and run!
|
|
56
|
+
|
|
38
57
|
## Why Guardrails Matter
|
|
39
58
|
|
|
40
59
|
Real problems that guardrails solve:
|
|
@@ -540,7 +559,7 @@ See source for all built-in guardrails:
|
|
|
540
559
|
|
|
541
560
|
## Examples
|
|
542
561
|
|
|
543
|
-
Browse 48+ runnable examples: [examples/README.md](./examples/README.md)
|
|
562
|
+
Browse 48+ runnable examples: [examples/README.md](./examples/README.md) |
|
|
544
563
|
|
|
545
564
|
### Quick Starts
|
|
546
565
|
|
|
@@ -623,6 +642,10 @@ Changes:
|
|
|
623
642
|
|
|
624
643
|
**Type-safe**: Rich TypeScript types and inference throughout.
|
|
625
644
|
|
|
645
|
+
**Comprehensive**: 40+ built-in guardrails covering security, quality, compliance, and performance.
|
|
646
|
+
|
|
647
|
+
**Advanced features**: Early detection, parallel execution, enhanced prompt injection detection, MCP security, and more.
|
|
648
|
+
|
|
626
649
|
## Contributing
|
|
627
650
|
|
|
628
651
|
Issues and PRs are welcome.
|