YaokunLin / chatbot-react-client

https://yaokunlin.github.io/chatbot-react-client/
1 stars 0 forks source link

Streaming responses #2

Closed markNZed closed 1 year ago

markNZed commented 1 year ago

Hi, I've being trying to learn bits of React and this project by taking a deep dive into it today. I've pushed on my forks of the client https://github.com/markNZed/chatbot-react-client and the server https://github.com/markNZed/chatbot-react-client so it has a simple implementation of websocket for a streaming response from chatGPT. It is not good enough to make a PR but it works. I would be happy to try and help if you want to keep working on this project but I do not know React or Node so it is more a learning exercise for me.

I did work on an extension that "hacked" the OpenAI chatGPT interface in Javascripte to provide word counts, history, copy, logging to MongoDB Atlas (a simple node server), templates, state-machine sequences of generated prompts and runs JS code-blocks generated by chatGPT in the browser during the session (including fetching web pages). I guess it would be relatively easy to bring some of that code into this project. But I would not be sure about how to do this in the "React" or Node way.

I'm particularly interested in having voice too, maybe the new Whisper API would be a way forward.