-
Notifications
You must be signed in to change notification settings - Fork 409
Streaming chunk accumulation #741
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
Merged
CalebCourier
merged 45 commits into
feat/streaming-update
from
nichwch/chunk-accumulation-rewrite
Jun 3, 2024
Merged
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
29ee128
preliminary code and pseudocode
nichwch 66a5333
add chunk accumulation strategy to Validator base class
nichwch 7831466
handle case where llm chunk > validator chunk in validator class
nichwch 2dbae2e
added some questions
nichwch 1e3544d
change stream_runner to handle the result of iterable validate
nichwch e9084e1
format
nichwch 1269f68
change validator base to use a chunking function instead of specifyin…
nichwch b454cd5
connect streaming all the way down call chain, include validated chun…
nichwch b64ab4e
change execute_validator to handle streaming
nichwch bf2bd32
make validate take stream parameter, remove validate_stream in top le…
nichwch c79e9b2
use wyatts sentence splitting strategy
nichwch 4583cb9
import nltk
nichwch f1b4a88
use stream-enabled execute_validator
nichwch 289745c
format
nichwch 58d8eed
fix bug where json_schema was being called with streaming
nichwch 947f476
conditionally use old logic for json_schema to avoid breaking json_sc…
nichwch 8b2c154
validate remainders
nichwch d6c3739
merge in main
nichwch 0ab245c
new chunk span validation schema
nichwch a320464
field for reason that validation failed for a given span
nichwch 93bb781
add validated_chunk to ValidationResult
nichwch 1381821
add helper method to get a list of error spans relative to llm output
nichwch 3ccdda1
conceptual question
nichwch 6fdbcd1
Merge branch 'main' into nichwch/chunk-accumulation-rewrite
nichwch f455ae2
Merge branch 'nichwch/chunk-accumulation-rewrite' into nichwch/stream…
nichwch 74485eb
turn chunking_function into class method
nichwch a39b5af
incomplete tests for streaming chunk accumulation
nichwch 0ae850e
format
nichwch 847dd0a
remove print
nichwch f0b3030
fix a few bugs uncovered by testing
nichwch e8b6069
tests (WIP) for streaming
nichwch 628e490
Merge branch 'main' into nichwch/chunk-accumulation-rewrite
nichwch a9a91a1
merge
nichwch eec8e19
base model
nichwch 8726a28
optional typing to avoid breaking existing validators
nichwch ba68eb6
top level helper function for spans on guard, patch validated_chunk i…
nichwch 2607423
attempt to use openai finish_reason field
nichwch da720c3
add comment explaining problem with using openai finish_message
nichwch 8bdb292
test error span behavior
nichwch 0abac83
address some changes
nichwch 8f45a0a
handle case where llm callable doesnt provide finished flag
nichwch dfcd3b8
Merge pull request #771 from guardrails-ai/nichwch/streaming-error-spans
nichwch fe56871
Merge branch 'feat/streaming-update' into nichwch/chunk-accumulation-…
CalebCourier b52b8cb
lint, type, and test fixes
CalebCourier 0aede77
use status for validation_passed in streaming
CalebCourier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.