-
Notifications
You must be signed in to change notification settings - Fork 674
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
Issues with Server Sent Events Client #1754
Comments
https://github.com/denoland/pixelpage Is implemented using SSE. Checkout I hope this helps |
I was working on trying this out, but the biggest issue i have is that it says BroadcastChannel and EventSource are not defined. Trying to see what i missed to have those included. I see your on fresh version 1.2, not sure if that is the issue |
Well that was easy, i didn't realize i needed the --unstable flag for those 2 to work. |
Alright, this is working for me now, i am able to stream stuff in, however, the EventSource just keeps reconnecting and calling the API over and over again. Any thoughts on how i can make the EventSource only execute once? |
I was able to address this issue by sending a [DONE] event at the end of the stream and listening for that on the client side, which allows me to then close the connection. This can probably be considered done in terms of my issues. Is there any value in my documenting the entire process for SSE in the docs for Fresh? Thanks for the help @smitssjors |
FYI: We've just switched over from SSE to websockets to establish a connection in development mode in #1943 . |
Having a bit of an issue getting a fresh implementation going of an SSE client.
We are doing some work with OpenAI through Azure and are trying to stream the responses back to the UI.
If you check out our project Communit Chat you can run it with
deno task start
and then if you navigate to/api/openaistream/gpt-35-turbo
you'll see that the API is responding with SSE and that the story comes in written in chunks.The issue is that i can't figure out how to get an Island together that renders the chunks into view. We are trying in the
islands/TextStream.tsx
but I am running into issues.at #fetch (mod.ts:124:35)
Any help in what i am doing wrong would be awesome, and i figure at the end of this we can PR into the docs a page on Server/Client SSE in Deno Fresh.
Thanks for the help!
The text was updated successfully, but these errors were encountered: