feat: support guardrail config option streamProcessingMode#12815
Open
dlew wants to merge 1 commit intodanny-avila:devfrom
Open
feat: support guardrail config option streamProcessingMode#12815dlew wants to merge 1 commit intodanny-avila:devfrom
streamProcessingMode#12815dlew wants to merge 1 commit intodanny-avila:devfrom
Conversation
`streamProcessingMode` affects how guardrail processes the stream from the model. If it's in "sync" mode, it chunks up the response and processes them before returning them to the user. If it's in "async" mode, it both processes the chunk & sends it to the user at the same time, allowing for smoother streaming (at the cost of guardrail only reacting *after* offending content starts to stream, in some cases).
6193d0d to
9182d9e
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
streamProcessingModeaffects how guardrail processes the stream from the model. If it's in "sync" mode, it chunks up the response and processes them before returning them to the user. If it's in "async" mode, it both processes the chunk & sends it to the user at the same time, allowing for smoother streaming (at the cost of guardrail only reacting after offending content starts to stream, in some cases).Related documentation change here: LibreChat-AI/librechat.ai#564
Change Type
streamProcessingModeLibreChat-AI/librechat.ai#564)Testing
I added
streamProcessingModeto an existing test to make sure it's processed by the guardrail configuration code.I also verified that setting it to
asyncin my librechat.yaml would result in a faster streaming response from Bedrock.Checklist
Please delete any irrelevant options.
streamProcessingModeLibreChat-AI/librechat.ai#564)