Skip to content

A simple and clean React frontend to interact with OpenAI's ChatGPT APIs. Includes image generation and chat history.

Notifications You must be signed in to change notification settings

claitz/claits-ChatGPT-GUI

Repository files navigation

clait's ChatGPT API GUI

Simple GUI to interact with various ChatGPT models via API.

This was created to provide an alternative to the amazing PatrikZeros ChatGPT API UI and to be easily deployable via Docker.

Features

  • Model selection
  • Multiple chat sessions
  • Chat history stored to MongoDB
  • Image generation with persistent local storage to MongoDB
  • Double click to copy code blocks
  • Toast notifications
  • Websocket server & streamed bot responses
  • Settings panel

Screenshots

Application Screenshot

Text request with response streaming:

Text Request

Image request:

Image Request

How to run

Docker (recommended)

Build and Push Docker Image Docker Pulls Docker Image Size (tag)

A prebuilt Docker image is available on Docker Hub and a docker-compose file is available as example in this repository.

  • Install Docker
  • Run docker compose up -d in the root directory of this repository or wherever you have the docker-compose.yml file
  • Open localhost:5000 in your browser

This will start the stack (app + MongoDB) and expose the app on port 5000. You can change the configuration in the docker-compose.yml file.

Example docker-compose.yml

version: '3.3'

services:
  claits-chatgpt-gui:
    image: claitz/claits-chatgpt-gui:latest
    container_name: claits-chatgpt-gui
    ports:
      - "3001:3001"
      - "5000:5000"
    environment:
      - REACT_APP_BACKEND_LISTEN_PORT=3001
      - REACT_APP_BACKEND_HOST=http://claits-chatgpt-gui:3001
      - MONGO_USERNAME=chatgpt
      - MONGO_PASSWORD=chatgpt
      - MONGO_HOST=mongo
      - MONGO_PORT=27017
      - MONGO_DB_NAME=chagpt-db

  mongo:
    image: mongo:5.0
    container_name: claits-chatgpt-gui-mongo
    volumes:
      - chatgpt-gui-persistence:/data/db
      - chatgpt-gui-persistence:/data/configdb
    ports:
      - "27017:27017"
    environment:
      - MONGO_INITDB_ROOT_USERNAME=chatgpt
      - MONGO_INITDB_ROOT_PASSWORD=chatgpt

volumes:
  chatgpt-gui-persistence:

Manually

  • Install the frontend dependencies: pnpm install
  • Install the server dependencies: cd server && pnpm install
  • Start the server: pnpm run server
  • Start the frontend: pnpm run start

Requirements

Running this locally requires a MongoDB instance to be running.

This and all other configuration options can be set in the .env files. You'll need to set the environment variables in .env by renaming .env.example to .env and editing the values as needed.

There are TWO .env files, one in the root directory and one in the /server directory - one for the frontend and one for the backend. Both need to be configured.

License

GNU General Public License v3.0

About

A simple and clean React frontend to interact with OpenAI's ChatGPT APIs. Includes image generation and chat history.

Topics

Resources

Stars

Watchers

Forks