This project provides a customizable web interface for ChatGPT, allowing you to host it locally and seamlessly forward user requests to OpenAI for response generation.
-
Education and Learning:
- Use Case: Educators or students interested in understanding how ChatGPT's interface works or teaching/learning web development.
- Benefit: Provides a hands-on learning experience, exploring frontend development, API integration, and web technologies used in the ChatGPT interface.
-
Research and Development:
- Use Case: Researchers or enthusiasts interested in analyzing, modifying, or extending the ChatGPT web interface.
- Benefit: Supports studying conversational AI interfaces, user interactions, or conducting experiments in a controlled environment.
-
UI/UX Customization:
- Use Case: Individuals who find the existing UI/UX not cool, they can come up with one that suits their tastes and preferences.
- Benefit: Provides an opportunity to modify, adapt, or extend the interface to align with specific branding or UI/UX requirements
-
Privacy and Security:
- Use Case: Concerned about data privacy or security, especially for sensitive conversations or testing confidential information.
- Benefit: One gets to know which kind of data you're sharing with OpenAI in real time.
-
Localized Deployment:
- Use Case: Operating in regions with restricted internet access or as part of an intranet system.
- Benefit: Allows for localized deployment, ensuring access to the ChatGPT interface within specific network boundaries or regions with limited internet connectivity.
- Clone repo and install dependencies
git clone https://github.com/Simatwa/revChatGPT.git
cd revChatGPT
pip install -r requirements.txt
- You need cookies to bypass the login stage. That has been well documented in WebChatGPT. Just in summary the document reads:
The script utilizes HTTP Cookies and OAuth to justify the REST-API requests at Openai.
In order to do that, we will use the export-cookie-for-puppeteer extension to extract the cookies which will later on used to retrieve the OAuth.
- Login to https://chat.openai.com
- Upon successfull login, use Export cookie JSON File Puppeteer to export cookies. If you haven't installed the extension, here are the quick installation links for you.
By doing that you are almost there.
Make path to the exported cookie file an environment variable identified by openai_cookie_file
or simply create a .env
file at the projects root directory and save the path in the format :
openai_cookie_file=<path-to-openai-cookie-file>
Recommended : Edit the env file as per your preferences and then rename it to .env
Fire up the server locally:
python -m flask run -p 8000
Then visit http://localhost:8000 .
Note : The server has been tweaked to be relevant only on localhost using port 8000.
Have fun.
While our quest involves unraveling the mystical tapestry of ChatGPT's web version, remember—this journey is for academic and exploratory purposes only!
-
⚡️ The mission ahead involves exploring the digital wizardry behind ChatGPT's web interface, but it's crucial to wield your code-swords responsibly.
-
🧙♂️ Reverse engineering is a curious spell, but only cast it upon ChatGPT's web version and not for nefarious sorcery or unauthorized mischief.
-
🛡️ While your curiosity is commendable, remember to honor the noble laws of the digital realm—respect intellectual property rights and avoid the dark paths of piracy.
Embrace the adventure, learn the arcane arts, but do so in the spirit of scholarly exploration and ethical wizardry!