Download the PHP package promptphp/intercept-pii-redactor without Composer
On this page you can find all versions of the php package promptphp/intercept-pii-redactor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download promptphp/intercept-pii-redactor
More information about promptphp/intercept-pii-redactor
Files in promptphp/intercept-pii-redactor
Package intercept-pii-redactor
Short Description PII redaction middleware for Laravel AI agents.
License MIT
Homepage https://intercept.promptphp.com
Informations about the package intercept-pii-redactor
Introduction
PIIRedactor is a Laravel AI SDK agent middleware that detects and handles sensitive personal or secret-like data before an agent prompt reaches the AI provider.
It can redact, mask, log, block, or fully delegate handling to a custom callback.
[!Important] This middleware is part of the Intercept middleware collection. It is designed to catch common structured sensitive data, not to guarantee complete detection of every possible personal identifier.
Quick start
Installation
You may publish the config or not, the middleware works out of the box.
Usage
Return the PIIRedactor middleware on an agent's middleware method.
[!Important] To add middleware to an agent, implement the
HasMiddlewareinterface and define a middleware method that returns an array of middleware classes.
Redacting PII
This is the recommended default for most applications.
Example input:
The prompt sent to the provider becomes:
Multiple values of the same type are indexed in the order they appear:
[!Important] For the complete guide, see the full documentation below.
Documentation
Full documentation can be found at https://intercept.promptphp.com/ or the docs directory on GitHub.
Contributing
Thank you for considering contributing to Intercept by PromptPHP. The contribution guide can be found in CONTRIBUTING.md.
Code of Conduct
We follow the Laravel Code of Conduct. We expect you to abide by these guidelines as well.
Security Vulnerabilities
If you discover a security vulnerability within Intercept by PromptPHP, please email Victor Ukam at [email protected]. All security vulnerabilities will be addressed promptly.
License
Intercept by PromptPHP is open-sourced software licensed under the MIT license.
Support
This library is created by Victor Ukam with contributions from the Open Source Community. If you've found this package useful, please consider sponsoring this project. It will go a long way to help with maintenance.