10x icon indicating copy to clipboard operation
10x copied to clipboard

Websocket

Open Pager07 opened this issue 1 year ago • 5 comments

added web socket implementation...

work to be done.. making pr for other's reference..

Pager07 avatar Aug 24 '24 14:08 Pager07

@Pager07 is attempting to deploy a commit to the ntegrals' projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 24 '24 14:08 vercel[bot]

@Pager07 Awesome work. Thank you so much 🙏 I'll properly review your commits soon!

ntegrals avatar Aug 26 '24 10:08 ntegrals

@Integrals, I've noticed that the code in this pr could use some cleanup— it might benefit from some refactoring and structural improvements. Since I'm still getting familiar with server actions and the Vercel ecosystem, I'd really appreciate your help in this area.

Pager07 avatar Aug 27 '24 10:08 Pager07

@Integrals, I’m also considering that closing the WebSocket after handling each prompt might not be the best approach. For future improvements, we might want to keep the WebSocket connection alive throughout the entire conversation to enhance efficiency and responsiveness.

Pager07 avatar Aug 27 '24 10:08 Pager07

In serverless environments web sockets may not be feasible and alternatives like stream-hooks with zod-stream would be better suited. Intructor.js docs cover this issue well: https://js.useinstructor.com/concepts/streaming/#alternatives-in-serverless-environments

siddicky avatar Sep 04 '24 15:09 siddicky