-
Notifications
You must be signed in to change notification settings - Fork 266
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
✨ [Widgets] Enable streaming in the conversational widget #486
Merged
Merged
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
bb2eba4
wip: enable streaming in conversational widget
SBrandeis 79fcfa3
factor away isTgiSupported
SBrandeis 679e367
tweaks
SBrandeis e4961b8
mention TGI in the widget
SBrandeis b271568
Reset input text after submit
SBrandeis cda8353
Update models displayed in the demo
SBrandeis 1576a53
revert unrelated change
SBrandeis 83dba35
lnt
SBrandeis 119114b
lint
SBrandeis f23e873
Export inference types + fix import type
SBrandeis b0a4b26
lint
SBrandeis 98b8229
types
SBrandeis 350f69e
Update packages/widgets/src/lib/components/InferenceWidget/shared/Wid…
SBrandeis 0b708f2
update tailwindcss
gary149 72340e9
add smd to tailwind config
gary149 55b73a3
text adjustements
gary149 d369c83
Suggestion from @krampstudio
SBrandeis 77e3880
Lint :)
SBrandeis 1bbdaea
use svelte class: syntax
SBrandeis 471a2b1
fix underline ptag
SBrandeis 78196e5
Merge branch 'main' into chat-widget-streaming
SBrandeis 28f1b8d
post-merge fix
SBrandeis 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 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 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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should
TextGenerationStreamOutput
live in@huggingface/tasks/src/tasks/text-generation/inference
just likeTextGenerationInput
&TextGenerationOutput
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question - cc @Wauplin with whom we discussed that previously
The current philosophy is to not type the streaming mode because it's transfer-specific, not inference-specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, we mentioned it here once: #468 (comment).
As a matter of fact, I came to the conclusion today that we should specify the
stream
parameter and the streamed output in our JS specs. I am currently starting to use the generated types in Python (see ongoing PR) and for now I've kepttext_generation
apart since I'm missingTextGenerationStreamResponse
(defined here but I don't want to mix the auto-generated types with previous definitions). Agree it's more "transfer-specific" rather than "inference-specific" but the thing is that settingstream=True
is modifying the output format so we need to document that somewhere.