docs: improve Grayswan guardrail documentation (#15875)
Co-authored-by: berri-teddy <teddy@berri.ai>
This commit is contained in:
parent
3319bbf277
commit
e8e91ac707
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user