docs(pii_masking.md): add pii masking to proxy docs

This commit is contained in:
Krrish Dholakia 2024-02-12 11:36:52 -08:00
parent 418fb09966
commit ad7e856a02
3 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,30 @@
import Image from '@theme/IdealImage';
# PII Masking
LiteLLM supports [Microsoft Presidio](https://github.com/microsoft/presidio/) for PII masking.
## Step 1. Add env
```bash
export PRESIDIO_ANALYZER_API_BASE="http://localhost:5002"
export PRESIDIO_ANONYMIZER_API_BASE="http://localhost:5001"
```
## Step 2. Set it as a callback in config.yaml
```yaml
litellm_settings:
litellm.callbacks = ["presidio"]
```
## Start proxy
```
litellm --config /path/to/config.yaml
```
This will mask the input going to the llm provider
<Image img={require('../../img/presidio_screenshot.png')} />

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

View file

@ -116,6 +116,7 @@ const sidebars = {
"proxy/model_management", "proxy/model_management",
"proxy/health", "proxy/health",
"proxy/debugging", "proxy/debugging",
"proxy/pii_masking",
{ {
"type": "category", "type": "category",
"label": "🔥 Load Balancing", "label": "🔥 Load Balancing",