Scan Streaming Text Chunks
rai_stream_scanScan LLM streaming text chunks for PII and harmful content without a live stream. Get per-chunk results and an aggregated summary with a stop recommendation.
Instructions
Scan a list of text chunks (as would arrive from an LLM streaming response) for PII and harmful content. Simulates the StreamingScanner guardrail without a live stream. Returns per-chunk scan results and an aggregated summary with stop recommendation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunks | Yes | Ordered list of text chunks from LLM output stream | |
| hard_stop | No | Stop processing after first PII detection | |
| scan_window | No | Scan every N chunks |