-
Notifications
You must be signed in to change notification settings - Fork 782
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
Add an example and type enhancement for TextStreamer #1066
Conversation
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.
Thanks! Just some suggestions.
Co-authored-by: Joshua Lochner <admin@xenova.com>
Co-authored-by: Joshua Lochner <admin@xenova.com>
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.
LGTM ✅ Will run tests + build docs & merge soon.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
If you don’t mind, I can contribute a |
That would be much appreciated! However, could you instead contribute it to https://github.com/huggingface/transformers.js-examples? We're in the process of moving all examples to that repository. In terms of stack, feel free to use what you like, but it should contribute to the example you are trying to showcase. For example, for a simple streaming example, I would recommend keeping it as simple as possible (just to highlight the important part; i.e., streaming). That said, it could be useful to see how to pass this information back from a web worker too, so feel free to contribute two examples if you'd like the second one to be more "fully-featured". In that case, feel free to use what you feel most comfortable with. One other thing to note is that Next.js introduces another level of complexity since it can be run as a non-static site. Anyway, things to consider - I look forward to the contribution! Thanks! |
Added a GenerationConfig option for TextStreamer and included an example in the documentation as part of #394. I used the example you provided directly and tried to adhere to the repository's style as much as possible, but please let me know if anything deviates from the standard.