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

feat: browser chat streaming example using vite+tailwind #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seonglae
Copy link

@seonglae seonglae commented Jan 23, 2025

Streaming is a critical feature, so I added a minimal example that implements chat functionality with streaming directly in the browser. You can view the working demo on this temporal demo page. The README follows a similar structure to other examples but excludes property additions since I am not sure about the convention.

This example avoids React and instead uses only HTML, TypeScript, Vite, and TailwindCSS to keep the implementation as minimal as possible. Inference is handled via a Web Worker, similar to other demos.

This PR builds on the previous work in huggingface/transformers.js#1066. If needed, I would like to contribute another example demonstrating how to implement streaming chat via API requests using @huggingface/transformers.js in the backend, which is a more common setup.

Please let me know if there are any areas for improvement!

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.

1 participant