A two-file JS-based UI for interacting with ChatGPT and/or Claude and/or Gemini in your browser. Requires you to supply your own API key(s).
I wanted something simple I could play with. The free ChatGPT demo is a nice UI, but it's not always available unless you get the $20 / month "ChatGPT Plus" plan. The API, priced at $0.002 / 1K tokens, will let you generate millions of words for that $20, but it doesn't have the nice UI.
The point of this project was to be extremely simple, so that it's easy to modify.
Other people have already built similar things with more features. Here's some I've seen (but cannot vouch for):
Get an API key from OpenAI and put it in OPENAI_KEY.txt
.
Get an API key from Anthropic and put it in ANTHROPIC_KEY.txt
.
Get an API key from Google AI and put it in GOOGLE_KEY.txt
.
(If you only have one of these, that's fine, just don't select the radio buttons to talk to ones you don't have.)
Put a list of usernames to allow in ALLOWED_USERS.txt
, one per line. This is not intended as a security feature, just something to help keep track of where usage is going.
Ensure you have a reasonably recent version of node installed. Then
npm install
node run.mts
If you are using a version of node prior to 23.6.0, you will likely need to include --experimental-strip-types
after the node
command.
This will bring up a server at http://localhost:21665
; point your browser there.
Happy chatting! And remember: don't trust it.
- support loading old conversations by drag-and-drop'ing them onto the window
- including deleted messages
- let you change the "system" prompt
- store old prompts in localstorage, default to most recent
- let you delete messages
- let you reroll the most recent message (clear it from UI and put your message in the chatbox)
- maybe let you customize the other parameters
- give you a tree view of the conversation so you can jump around
- support up arrow to load old messages
- stop button
- error handling, I guess