A take on ChatGPT with some features that I have wanted for a while. Also testing out using Vite with PhET code. See https://github.com/phetsims/phet-vite-demo.
Mostly, it has speech built in to the web interface, either from SpeechSynthesis or from OpenAI's speech API. Conversations are saved to local storage.
(1) Clone the repo.
(2) Install dev dependencies:
cd custom-chat
npm install
(3) Create a .env file in the root directory. Add your OpenAI API key to the .env file:
OPENAI_API_KEY=your-api-key
(4) Run it from a browser:
The following will run a server on your local machine, and you can navigate to the URL:
npm run dev
It will print out the URL to navigate to, e.g. http://localhost:5173/.
- Handle changing conversations mid-request.
- Settings for voice/speech options.
- Stream results from OpenAI.