HostedGPT is a free, open-source alternative to ChatGPT. You can run it on your own computer or any server that supports Ruby on Rails, just bring your own OpenAI API key. All the core functionality of ChatGPT is already working (e.g. GPT-3.5 and GPT-4, starting new converstions, streaming responses, asking about attached images, etc). The main thing missing is the mobile app but that's coming soon.
This project is actively looking for contributors to help make it great. The goal is for every feature that exists in ChatGPT to exist in this app, then we can start adding lots of new features and extensions beyond what ChatGPT supports.
-
Enjoy chat history, but without your private conversations being used for training!
Did you know that all your private, personal past conversations in the left sidebar are allowed to be used for OpenAI training? Disclosed in this OpenAI article. HostedGPT excludes your history from OpenAI training.
-
Don't commit yourself to $20 per month when you may not use ChatGPT a lot. You only pay as much as you use!
-
You will never hit the 'You've reached the current usage cap for GPT-4'. You pay per mesage based on the API rates so you can keep using it as much as you want.
You can deploy a full version of HostedGPT to the hosting service, Render, for free. This free app works for 90 days and then the database will stop working. You will need to upgrade to a paid version of the database which is $7 / month. Alternatively, you can also run it off your local computer. Jump down to the Developer Instructions if you want to run it locally.
- Click Fork > Create New Fork at the top of this repository
- Create an account on Render.com and login
- View your newly created fork within github.com and click the button below:
- In Blueprint Name, type anything such as "hostedgpt-"
- Click Apply
- Wait for the hostedgpt database and web service to be deployed. The first deploy takes a good 5 minutes so be patient. After they are all deployed, click Dashboard at the top of the Render screen. Or if an error occurs, skip to Troubleshooting Render below.
- You should see two "Service Names" called "hostedgpt-..." (the name you picked), click the one that is of type Web Service
- On the details screen, click the URL that looks something like hostedgpt-XXX.onrender.com
NOTE: After 15 minutes of not using the app your Render server will pause. Next time you visit the first request will auto-resume the server, but this resume is slow. If this annoys you, upgrade Render for $7 per month:
- Go to your Render Dashboard
- Click "HostedGPT" or whatever you named your Web Service
- Click "Upgrade" and select $7 per month
- If you encountered an error while waiting for the services to be deployed on Render, click Dashboard at the top of the Render screen and click the Service that failed.
- It should take you to the Events section and the top event should explain the error. It will probably contain a link to click to the deploy logs
- Scroll back up through the logs and find any instances of errors. Open a new Issue for us and share details.
- When you are ready to try Render again, it's best to do the following:
- First, ensure your repo is caught up. Open your fork in github, click the Sync Fork button so that any bug fixes are pulled in.
- Second, in Render navigate to the Dashboard, Bluebrint, and Env Groups and delete any details associated with hostedgpt
- Now you can go back to your repo and click Deploy to Render
We welcome contributors! After you get your developoment environment setup, review the list of Issues. We organize the issues into Milestones and are currently working on v0.6. View 0.6 Milestone. Look for any issues tagged with Good first issue and add a comment so we know you're working on it.
The easiest way to get up and running is to use the provided docker compose workflow. The only things you need installed on your computer are Docker and Git.
- Make sure you have Docker Desktop installed and running.
- Clone your fork
git clone [repository url]
cd
into your clone.- Run
docker compose up
to start the app. - Open http://localhost:3000 and register as a new user.
- Run tests:
docker compose run base rails test
- Open the rails console:
docker compose run base rails console
- Run a psql console:
docker compose run base psql
Alternatively, you can set up your development environment locally:
HostedGPT requires these services to be running:
- Postgres (installation instructions)
- Redis (installation instructions)
- asdf-vm (installation instructions)
cd
into your local repository cloneasdf install
to install the correct ruby versionbundle install
to install ruby gemsbin/rails db:setup
< Note: This will load the sample fixture data into your databasebin/rails dev
< Starts up all the services- Open http://localhost:3000 and register as a new user.