guardrails
guardrails copied to clipboard
Streaming Error Span schema
trafficstars
Adds validated_chunk field to ValidationResult, and error_spans to FailResult. Error spans track the specific character index ranges that are causing validation failure.
Additionally, a helper method that converts error spans in a fail result (which are indexed relative to the validated_chunk) into error spans that are relative to the entire LLM output