Websocket
added web socket implementation...
work to be done.. making pr for other's reference..
@Pager07 is attempting to deploy a commit to the ntegrals' projects Team on Vercel.
A member of the Team first needs to authorize it.
@Pager07 Awesome work. Thank you so much 🙏 I'll properly review your commits soon!
@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.
@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.
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