Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming Error Span schema #771

Merged

Conversation

nichwch
Copy link
Collaborator

@nichwch nichwch commented May 16, 2024

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

dependabot bot and others added 3 commits April 12, 2024 04:13
Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](kjd/idna@v3.6...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Copy link

@nichwch nichwch changed the base branch from main to nichwch/chunk-accumulation-rewrite May 21, 2024 16:32
@nichwch nichwch marked this pull request as ready for review May 22, 2024 16:18
guardrails/classes/history/outputs.py Outdated Show resolved Hide resolved
guardrails/guard.py Outdated Show resolved Hide resolved
guardrails/run/stream_runner.py Show resolved Hide resolved
guardrails/validator_base.py Show resolved Hide resolved
@CalebCourier CalebCourier self-assigned this May 28, 2024
@nichwch nichwch merged commit dfcd3b8 into nichwch/chunk-accumulation-rewrite May 28, 2024
@nichwch nichwch deleted the nichwch/streaming-error-spans branch May 28, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants