Skip to content

MatthiasLubbertsen/HatGPT

Repository files navigation

HatGPT

HatGPT preview

Dynamic JSON Badge

whats this?

a chatgpt.com ui clone! yay free using HackAI, open source and idk what more

features

  • usable without key
  • support for all models
  • add your own token for higher rate limits
  • image generation support
  • image upload support
  • file upload support (bucky)
  • title generation
  • gravatar pfp
  • search through your chats
  • model dropdown
  • responsive

getting started

easiest way

use the hosted version by me! hatgpt.vercel.app

self host easy way

deploy to vercel!

Deploy with Vercel

run locally

  1. clone the repo (duh)
  2. install with npm install
  3. create a .env file with your HackAI token as PUBLIC_API_KEY (for public usage)
  4. run the app with npm start
  5. open http://localhost:3000 and start chatting

for development

you might want to do

  1. run npm run bs

to let BrowserSync reload the page for you at http://localhost:3001

serverless api endpoints

  • api/ai - SSE proxy with some cleanup
  • api/title - title generation w/ first message as input
  • api/upload - uploading file to bucky
  • api/status - HackAI models
  • api/models - proxy to HackAI models

todo

  • chat functionality
  • model dropdown
  • title generation
  • attachments
  • HackAI status
  • rate limit for public key (2 per minute?)
  • title generation with public key
  • test image upload
  • test file upload
  • test image generation
  • phone view top bar styling
  • phone view sidebar > settings close it
AI declaration ## I made almost all of the chatgpt.com ui clone myself, and i got tired of the project bc there were so many things to fix. so i used ai to help me with the rest wich is declared here (grabbed from my chats): * textarea resizing when more than 1 line * model dropdown functionality * chat functionality * dynamic script loading * saving api key to local storage * simplifying SSE code * implementing chat history * chat savings and title generation * ui enhancements for api key modal * search chats * blinking dot * gravatar pfp * scroll behavior * helping with system prompt * selected text * file upload * title with public key * rate limiting