docs: improve Grayswan guardrail documentation (#15875)

Co-authored-by: berri-teddy <teddy@berri.ai>
This commit is contained in:
Teddy Amkie 2025-10-28 19:29:40 -07:00 committed by GitHub
parent 3319bbf277
commit e8e91ac707
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,7 @@ Cygnal returns a `violation` score between `0` and `1` (higher means more likely
```bash
export GRAYSWAN_API_KEY="your-grayswan-key"
export GRAYSWAN_API_BASE="https://api.grayswan.ai"
```
### 2. Configure `config.yaml`
@ -37,6 +38,7 @@ guardrails:
guardrail: grayswan
mode: [pre_call, post_call] # monitor both input and output
api_key: os.environ/GRAYSWAN_API_KEY
api_base: os.environ/GRAYSWAN_API_BASE # optional
optional_params:
on_flagged_action: monitor # or "block"
violation_threshold: 0.5 # score >= threshold is flagged