Web interface to chat with GPT 3.5 and 4, designed for the homelab
UNLICENSE License
Web interface to chat with GPT 3.5 and 4, designed with a homelab environment in mind.
I created this app because I use OpenAI's API's directly to get help with programming and general questions using GPT4, but find OpenAI's playground cumbersome to use directly. Others in my household then began finding this app handy so I made the interface simple, aesthetically pleasing, and support multiple users. You might find it helpful if you want a convenient but powerful way to interact with Open AI's chat models and also have a docker environment set up in your homelab.
Broadly speaking the webapp provides an interface similar to Open AI's playground, but oriented for daily use:
docker run -p 80:80 -e OPEN_API_KEY=your_open_api_key_here chatgpt -v .:/data ghcr.io/sabeechen/homelab-gpt:latest
Once run the interface will be available on port 80 and an empty database will be initialized in the directory or volume you mounted. Mounting this directly is only needed if you intend to log in.
version: '2.4'
services:
gpt-chat:
image: ghcr.io/sabeechen/homelab-gpt
container_name: gpt-chat
environment:
OPENAI_API_KEY: your_openai_api_key
volumes:
- "/some/local/directory:/data"
git clone https://github.com/sabeechen/homelab-gpt
cd homelab-gpt
docker build -t chatgpt .
Open the projects' devcontainer in VSCode. It might take a few minutes to spin up.
npm i -g
Store your OpenAI API key in .env
file
echo "OPENAI_API_KEY=your_api_key_goes_here``` >> .env
npm run build
Run the "Dev Server" run configuration to start the server side of things.
Visit http://localhost:80 to use the website.
Repeat steps 4 through 6 as you change code.
Some notes on developing this: