{"id":16317073,"url":"https://github.com/simatwa/revchatgpt","last_synced_at":"2025-03-22T21:31:34.173Z","repository":{"id":214741217,"uuid":"737253350","full_name":"Simatwa/revChatGPT","owner":"Simatwa","description":"Host ChatGPT locally","archived":false,"fork":false,"pushed_at":"2024-01-15T22:35:23.000Z","size":1763,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T18:45:19.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Simatwa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-30T11:04:17.000Z","updated_at":"2024-07-16T13:12:24.000Z","dependencies_parsed_at":"2024-10-23T00:30:29.368Z","dependency_job_id":null,"html_url":"https://github.com/Simatwa/revChatGPT","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"1f0f8c2838ceb34317c49cf4d706d86905190864"},"previous_names":["simatwa/revchatgpt"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2FrevChatGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2FrevChatGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2FrevChatGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2FrevChatGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simatwa","download_url":"https://codeload.github.com/Simatwa/revChatGPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244246466,"owners_count":20422452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T22:06:31.116Z","updated_at":"2025-03-22T21:31:33.584Z","avatar_url":"https://github.com/Simatwa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e revChatGPT \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/static/v1?logo=MIT\u0026color=Blue\u0026message=MIT\u0026label=License\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Black\" src=\"https://img.shields.io/static/v1?logo=Black\u0026label=Code-style\u0026message=Black\"/\u003e\u003c/a\u003e\n\u003ca href=\"#\"\u003e\u003cimg alt=\"Passing\" src=\"https://img.shields.io/static/v1?logo=Docs\u0026label=Docs\u0026message=Passing\u0026color=green\"/\u003e\u003c/a\u003e\n\u003ca href=\"#\" alt=\"progress\"\u003e\u003cimg alt=\"Progress\" src=\"https://img.shields.io/static/v1?logo=Progress\u0026label=Progress\u0026message=95%\u0026color=green\"/\u003e\u003c/a\u003e\n\u003c!--\u003ca href=\"https://github.com/Simatwa/revChatGPT/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/downloads/Simatwa/WebChatGPT/total?label=Downloads\u0026color=success\" alt=\"Downloads\"\u003e\u003c/img\u003e\u003c/a\u003e --\u003e\n\u003ca href=\"https://github.com/Simatwa/revChatGPT/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/Simatwa/revChatGPT?color=success\u0026label=Release\u0026logo=github\" alt=\"Latest release\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Simatwa/revChatGPT/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release-date/Simatwa/revChatGPT?label=Release date\u0026logo=github\" alt=\"release date\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003ca href=\"https://hits.seeyoufarm.com\"\u003e\u003cimg src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com/Simatwa/revChatGPT\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://wakatime.com/badge/github/Simatwa/revChatGPT\"\u003e\u003cimg src=\"https://wakatime.com/badge/github/Simatwa/revChatGPT.svg\" alt=\"wakatime\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis project provides a customizable web interface for ChatGPT, allowing you to host it locally and seamlessly forward user requests to OpenAI for response generation. \n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"assets/demo1.png\" width=\"90%\"/\u003e \n\u003cimg src=\"assets/demo.png\" width=\"90%\"/\u003e\n\u003c/p\u003e\n\n\n## **Use Cases**\n\n1. Education and Learning:\n   - **Use Case**: Educators or students interested in understanding how ChatGPT's interface works or teaching/learning web development.\n   - **Benefit**: Provides a hands-on learning experience, exploring frontend development, API integration, and web technologies used in the ChatGPT interface.\n\n\n2. Research and Development:\n   - **Use Case**: Researchers or enthusiasts interested in analyzing, modifying, or extending the ChatGPT web interface.\n   - **Benefit**: Supports studying conversational AI interfaces, user interactions, or conducting experiments in a controlled environment.\n\n3. UI/UX Customization:\n   - **Use Case**: Individuals who find the existing UI/UX not cool, they can come up with one that suits their tastes and preferences.\n   - **Benefit**: Provides an opportunity to modify, adapt, or extend the interface to align with specific branding or UI/UX requirements\n\n4. Privacy and Security:\n   - **Use Case**: Concerned about data privacy or security, especially for sensitive conversations or testing confidential information.\n   - **Benefit**: One gets to know which kind of data you're sharing with OpenAI in real time.\n\n5. Localized Deployment:\n   - **Use Case**: Operating in regions with restricted internet access or as part of an intranet system.\n   - **Benefit**: Allows for localized deployment, ensuring access to the ChatGPT interface within specific network boundaries or regions with limited internet connectivity.\n\n## Installation\n\n- Clone repo and install dependencies\n\n```\ngit clone https://github.com/Simatwa/revChatGPT.git\ncd revChatGPT\npip install -r requirements.txt\n```\n\n## Usage \n\n- You need cookies to bypass the login stage. That has been well documented in [WebChatGPT](https://github.com/Simatwa/WebChatGPT). Just in summary the document reads:\n\nThe script utilizes [HTTP Cookies](https://en.wikipedia.org/wiki/HTTP_cookie) and [OAuth](https://en.wikipedia.org/wiki/OAuth) to justify the REST-API requests at [Openai](https://openai.com). \n\nIn order to do that, we will use the [export-cookie-for-puppeteer](https://github.com/ktty1220/export-cookie-for-puppeteer) extension to extract the cookies which will later on used to retrieve the OAuth.\n\n### Procedure\n\n1. Login to https://chat.openai.com\n2. 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. \n - [Google Chrome](https://chrome.google.com/webstore/detail/nmckokihipjgplolmcmjakknndddifde)\n- [Firefox](https://addons.mozilla.org/ja/firefox/addon/%E3%82%AF%E3%83%83%E3%82%AD%E3%83%BCjson%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%87%BA%E5%8A%9B-for-puppeteer/)\n\nBy doing that you are almost there.\n\nMake 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 :\n\n`openai_cookie_file=\u003cpath-to-openai-cookie-file\u003e`\n\n\u003e **Recommended** : Edit the [env](env) file as per your preferences and then rename it to *.env*\n\nFire up the server locally:\n\n`python -m flask run -p 8000`\n\nThen visit http://localhost:8000 .\n\n\u003e **Note** : The server has been tweaked to be relevant only on localhost using port 8000.\n\nHave fun. \n\n## 🛑 Disclaimer\n\nWhile our quest involves unraveling the mystical tapestry of ChatGPT's web version, remember—this journey is for academic and exploratory purposes only!\n\n- ⚡️ The mission ahead involves exploring the digital wizardry behind ChatGPT's web interface, but it's crucial to wield your code-swords responsibly.\n\n- 🧙‍♂️ Reverse engineering is a curious spell, but only cast it upon ChatGPT's web version and not for nefarious sorcery or unauthorized mischief.\n\n- 🛡️ 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.\n\nEmbrace the adventure, learn the arcane arts, but do so in the spirit of scholarly exploration and ethical wizardry!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimatwa%2Frevchatgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimatwa%2Frevchatgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimatwa%2Frevchatgpt/lists"}