chatgpt-gui


Namechatgpt-gui JSON
Version 0.4.1 PyPI version JSON
download
home_page
SummaryAn unofficial GUI app for ChatGPT.
upload_time2022-12-17 01:37:15
maintainer
docs_urlNone
author
requires_python>=3.10
license
keywords ai gpt gui app client unofficial chatgpt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ChatGPT-GUI
===============

[![MIT License](https://img.shields.io/github/license/Cubicpath/ChatGPT-GUI?style=flat-square)][license]
[![PyPI](https://img.shields.io/pypi/v/chatgpt-gui?label=PyPI&logo=pypi&style=flat-square)][homepage]
[![Python](https://img.shields.io/pypi/pyversions/chatgpt-gui?label=Python&logo=python&style=flat-square)][python]
[![CPython](https://img.shields.io/pypi/implementation/chatgpt-gui?label=Impl&logo=python&style=flat-square)][python]

------------------------------

An unofficial GUI app for ChatGPT.

------------------------------

**Note: This project is in a public alpha, and as such, many features are not complete.**

### Other Documents:
- [Changelog][changelog_github]
- [License][license_github]

### Table of Contents
- [About](#about)
     - [Features](#features)
- [How to Use](#how-to-use)
     - [Installation](#installation)
     - [Authentication](#authentication)
          - [Session Token Guide](#session-token-guide)
          - [Session Data](#session-data)
     - [Saving/Loading Conversations](#savingloading-conversations)
     - [Themes](#themes)
          - [Theme File Structure](#theme-file-structure)


### Disclaimer:
_**ChatGPT-GUI is in no way associated with, endorsed by, or otherwise affiliated with OpenAI.**_

About:
---------------
ChatGPT-GUI is an application written using [Qt for Python][PySide] that allows you to
easily talk to Assistant, the AI based on [ChatGPT].

This project is a fork of my other project, [HaloInfiniteGetter](https://github.com/Cubicpath/HaloInfiniteGetter).

If you like this application, be sure to star :)

### Features:
- ~~[x] Email/Password Login to [ChatGPT] Without Browser~~
  - ~~(Captcha solving is untested but implemented)~~
- [x] Proxy Settings
  - Supported Protocols are `HTTP` and `SOCKS5`
- [x] Executable Script in PATH (`chatgpt`)
- [x] Desktop & Start Menu Shorcuts
- [x] Session (token) Persistence
- [x] Automatic Access Token Refreshing
- [x] Multiple Concurrent Conversations
- [x] Conversation Saving & Loading
- [x] Multi-line input
- [x] Exception Reporter & Traceback Viewer
- [x] Themes
  - Builtin themes are: [Breeze Dark, Breeze Light, and Legacy]

#### Todo:
- [ ] Pretty Conversation Views
- [ ] Retry AI Message

How to Use:
---------------

### Installation:
- First, install Python 3.10 using [this link][python310]
- Then, open command prompt (Win + R -- type in "cmd") and type `pip install chatgpt-gui`
  - Optionally, to install the latest unstable version, type `pip install git+https://github.com/Cubicpath/ChatGPT-GUI.git`
- And you are done! To launch the program simply type `chatgpt`
  - Once launched, you can create a desktop shortcut by using the `Create Desktop Shortcut` tool
under the `Tools` context menu

### Authentication:
~~Thanks to [rawandahmad698] and [tls-client][python-tls-client], there exists a method to authenticate without
messing around with tokens or the browser. Simply sign in from the app itself!.~~

**Google Chrome is currently required to automatically bypass cloudflare.**

Email & Password login is currently not working.
Refer to session token authentication in the meantime.

![Sign In](https://i.imgur.com/DabSYBhl.png)

#### Session Token Guide:
- Sign in to [ChatGPT] on your browser
- Navigate to the Cookies for chat.openai.com
  - On Firefox -- F12 > Move to the "Storage" tab > Under "Cookies" select https://chat.openai.com
- Double-click the `__Secure-next-auth.session-token` cookie value and copy with CTRL + C
- Open the Settings window, unlock the input by pressing the "Edit Session Token" button, then paste the copied value.
- Press the Set button, and you should now be authenticated!

#### Session Data:
Session data is stored in a hidden file (`~/.config/chatgpt_gui/.session.json`), for persistence.
When you sign out or clear your session token, it automatically deletes all session data.

If you ever need to directly edit your session data, it follows the following format:
```json
{
  "user": {
    "id": "Your user id (starting with a 'user-' prefix)",
    "name": "Your username (usually same as your email)",
    "email": "The email tied to your session",
    "image": "Link to your profiles image (usually same as your picture)",
    "picture": "Link to your profile picture",
    "groups": [],
    "features": []
  },
  "cloudflare": {
    "bm": "Value of the __cf_bm cookie",
    "clearance": "Value of the cf_clearance cookie",
    "expires": "1h from the time cf_clearance is acquired"
  },
  "expires": "Automatically acquired after refresh_auth()",
  "token": "Value of the __Secure-next-auth.session-token cookie",
  "user_agent": "User Agent the Client/Authenticator use"
}
```

### Saving/Loading Conversations
You can save your currently selected conversation with ChatGPT by right-clicking any tab and
pressing the `Export Conversation To...` button. This will open a file dialog where you can rename
your conversation anything, which will show when loaded.

You can load a conversation that was previously saved by pressing the `Import Conversation From...`
button, and selecting the JSON file containing the conversation.

By default, all conversations are stored in the `~/.cache/chatgpt_gui/` directory.
But you can choose any folder when exporting.

**NOTE: Conversations from one account CANNOT be accessed from another.**

#### Conversation Format:
Conversations are stored as a linear list of messages, where each message is
a response to the one before it. All UUID's are tracked, which allows the Client to
continue conversations after import.

They are stored in the following data format:
```json
{
  "id": "Conversation UUID",
  "messages": [
    {
      "id": "Message UUID",
      "role": "user",
      "content": {
        "content_type": "text",
        "parts": [
          "Your message to ChatGPT"
        ]
      }
    },
    {
      "id": "Message UUID",
      "role": "assistant",
      "content": {
        "content_type": "text",
        "parts": [
          "Response from ChatGPT"
        ]
      }
    }
  ]
}
```

### Themes:
Themes are a way to style already-existing elements (Think CSS). They are held in a directory with their resources
and stylesheet in the same folder level.

#### Theme File Structure:
    ../
    │
    ├───[theme_id]/
    │       ├─── [icon1_name].svg
    │       ├─── [icon2_name].svg
    │       ├─── [icon3_name].svg
    │       └─── stylesheet.qss
    │

The current builtin themes are:
- `Breeze Dark`
- `Breeze Light`
- `Legacy (Default Qt)`

While the current breeze themes are slightly modified versions, you can view the original themes at [BreezeStyleSheets].

[BreezeStyleSheets]: https://github.com/Alexhuszagh/BreezeStyleSheets "BreezeStyleSheets"
[changelog_github]: https://github.com/Cubicpath/ChatGPT-GUI/blob/master/CHANGELOG.md "Changelog"
[ChatGPT]: https://https://chat.openai.com "ChatGPT"
[homepage]: https://pypi.org/project/chatgpt-gui/ "ChatGPT-GUI PyPI"
[license]: https://choosealicense.com/licenses/mit "MIT License"
[license_github]: https://github.com/Cubicpath/ChatGPT-GUI/blob/master/LICENSE "MIT License"
[PySide]: https://pypi.org/project/PySide6/ "PySide6"
[python]: https://www.python.org "Python"
[python310]: https://www.python.org/downloads/release/python-3100/ "Python 3.10"
[rawandahmad698]: https://github.com/rawandahmad698 "rawandahmad698"
[python-tls-client]: https://github.com/FlorianREGAZ/Python-Tls-Client "tls-client"


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "chatgpt-gui",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "ai,gpt,gui,app,client,unofficial,ChatGPT",
    "author": "",
    "author_email": "Cubicpath <cubicpath@pm.me>",
    "download_url": "https://files.pythonhosted.org/packages/bb/b6/3b775a9aa020670728673e09398e03fd5f8aee132015699819300bc7b47d/chatgpt-gui-0.4.1.tar.gz",
    "platform": null,
    "description": "ChatGPT-GUI\n===============\n\n[![MIT License](https://img.shields.io/github/license/Cubicpath/ChatGPT-GUI?style=flat-square)][license]\n[![PyPI](https://img.shields.io/pypi/v/chatgpt-gui?label=PyPI&logo=pypi&style=flat-square)][homepage]\n[![Python](https://img.shields.io/pypi/pyversions/chatgpt-gui?label=Python&logo=python&style=flat-square)][python]\n[![CPython](https://img.shields.io/pypi/implementation/chatgpt-gui?label=Impl&logo=python&style=flat-square)][python]\n\n------------------------------\n\nAn unofficial GUI app for ChatGPT.\n\n------------------------------\n\n**Note: This project is in a public alpha, and as such, many features are not complete.**\n\n### Other Documents:\n- [Changelog][changelog_github]\n- [License][license_github]\n\n### Table of Contents\n- [About](#about)\n     - [Features](#features)\n- [How to Use](#how-to-use)\n     - [Installation](#installation)\n     - [Authentication](#authentication)\n          - [Session Token Guide](#session-token-guide)\n          - [Session Data](#session-data)\n     - [Saving/Loading Conversations](#savingloading-conversations)\n     - [Themes](#themes)\n          - [Theme File Structure](#theme-file-structure)\n\n\n### Disclaimer:\n_**ChatGPT-GUI is in no way associated with, endorsed by, or otherwise affiliated with OpenAI.**_\n\nAbout:\n---------------\nChatGPT-GUI is an application written using [Qt for Python][PySide] that allows you to\neasily talk to Assistant, the AI based on [ChatGPT].\n\nThis project is a fork of my other project, [HaloInfiniteGetter](https://github.com/Cubicpath/HaloInfiniteGetter).\n\nIf you like this application, be sure to star :)\n\n### Features:\n- ~~[x] Email/Password Login to [ChatGPT] Without Browser~~\n  - ~~(Captcha solving is untested but implemented)~~\n- [x] Proxy Settings\n  - Supported Protocols are `HTTP` and `SOCKS5`\n- [x] Executable Script in PATH (`chatgpt`)\n- [x] Desktop & Start Menu Shorcuts\n- [x] Session (token) Persistence\n- [x] Automatic Access Token Refreshing\n- [x] Multiple Concurrent Conversations\n- [x] Conversation Saving & Loading\n- [x] Multi-line input\n- [x] Exception Reporter & Traceback Viewer\n- [x] Themes\n  - Builtin themes are: [Breeze Dark, Breeze Light, and Legacy]\n\n#### Todo:\n- [ ] Pretty Conversation Views\n- [ ] Retry AI Message\n\nHow to Use:\n---------------\n\n### Installation:\n- First, install Python 3.10 using [this link][python310]\n- Then, open command prompt (Win + R -- type in \"cmd\") and type `pip install chatgpt-gui`\n  - Optionally, to install the latest unstable version, type `pip install git+https://github.com/Cubicpath/ChatGPT-GUI.git`\n- And you are done! To launch the program simply type `chatgpt`\n  - Once launched, you can create a desktop shortcut by using the `Create Desktop Shortcut` tool\nunder the `Tools` context menu\n\n### Authentication:\n~~Thanks to [rawandahmad698] and [tls-client][python-tls-client], there exists a method to authenticate without\nmessing around with tokens or the browser. Simply sign in from the app itself!.~~\n\n**Google Chrome is currently required to automatically bypass cloudflare.**\n\nEmail & Password login is currently not working.\nRefer to session token authentication in the meantime.\n\n![Sign In](https://i.imgur.com/DabSYBhl.png)\n\n#### Session Token Guide:\n- Sign in to [ChatGPT] on your browser\n- Navigate to the Cookies for chat.openai.com\n  - On Firefox -- F12 > Move to the \"Storage\" tab > Under \"Cookies\" select https://chat.openai.com\n- Double-click the `__Secure-next-auth.session-token` cookie value and copy with CTRL + C\n- Open the Settings window, unlock the input by pressing the \"Edit Session Token\" button, then paste the copied value.\n- Press the Set button, and you should now be authenticated!\n\n#### Session Data:\nSession data is stored in a hidden file (`~/.config/chatgpt_gui/.session.json`), for persistence.\nWhen you sign out or clear your session token, it automatically deletes all session data.\n\nIf you ever need to directly edit your session data, it follows the following format:\n```json\n{\n  \"user\": {\n    \"id\": \"Your user id (starting with a 'user-' prefix)\",\n    \"name\": \"Your username (usually same as your email)\",\n    \"email\": \"The email tied to your session\",\n    \"image\": \"Link to your profiles image (usually same as your picture)\",\n    \"picture\": \"Link to your profile picture\",\n    \"groups\": [],\n    \"features\": []\n  },\n  \"cloudflare\": {\n    \"bm\": \"Value of the __cf_bm cookie\",\n    \"clearance\": \"Value of the cf_clearance cookie\",\n    \"expires\": \"1h from the time cf_clearance is acquired\"\n  },\n  \"expires\": \"Automatically acquired after refresh_auth()\",\n  \"token\": \"Value of the __Secure-next-auth.session-token cookie\",\n  \"user_agent\": \"User Agent the Client/Authenticator use\"\n}\n```\n\n### Saving/Loading Conversations\nYou can save your currently selected conversation with ChatGPT by right-clicking any tab and\npressing the `Export Conversation To...` button. This will open a file dialog where you can rename\nyour conversation anything, which will show when loaded.\n\nYou can load a conversation that was previously saved by pressing the `Import Conversation From...`\nbutton, and selecting the JSON file containing the conversation.\n\nBy default, all conversations are stored in the `~/.cache/chatgpt_gui/` directory.\nBut you can choose any folder when exporting.\n\n**NOTE: Conversations from one account CANNOT be accessed from another.**\n\n#### Conversation Format:\nConversations are stored as a linear list of messages, where each message is\na response to the one before it. All UUID's are tracked, which allows the Client to\ncontinue conversations after import.\n\nThey are stored in the following data format:\n```json\n{\n  \"id\": \"Conversation UUID\",\n  \"messages\": [\n    {\n      \"id\": \"Message UUID\",\n      \"role\": \"user\",\n      \"content\": {\n        \"content_type\": \"text\",\n        \"parts\": [\n          \"Your message to ChatGPT\"\n        ]\n      }\n    },\n    {\n      \"id\": \"Message UUID\",\n      \"role\": \"assistant\",\n      \"content\": {\n        \"content_type\": \"text\",\n        \"parts\": [\n          \"Response from ChatGPT\"\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Themes:\nThemes are a way to style already-existing elements (Think CSS). They are held in a directory with their resources\nand stylesheet in the same folder level.\n\n#### Theme File Structure:\n    ../\n    \u2502\n    \u251c\u2500\u2500\u2500[theme_id]/\n    \u2502       \u251c\u2500\u2500\u2500 [icon1_name].svg\n    \u2502       \u251c\u2500\u2500\u2500 [icon2_name].svg\n    \u2502       \u251c\u2500\u2500\u2500 [icon3_name].svg\n    \u2502       \u2514\u2500\u2500\u2500 stylesheet.qss\n    \u2502\n\nThe current builtin themes are:\n- `Breeze Dark`\n- `Breeze Light`\n- `Legacy (Default Qt)`\n\nWhile the current breeze themes are slightly modified versions, you can view the original themes at [BreezeStyleSheets].\n\n[BreezeStyleSheets]: https://github.com/Alexhuszagh/BreezeStyleSheets \"BreezeStyleSheets\"\n[changelog_github]: https://github.com/Cubicpath/ChatGPT-GUI/blob/master/CHANGELOG.md \"Changelog\"\n[ChatGPT]: https://https://chat.openai.com \"ChatGPT\"\n[homepage]: https://pypi.org/project/chatgpt-gui/ \"ChatGPT-GUI PyPI\"\n[license]: https://choosealicense.com/licenses/mit \"MIT License\"\n[license_github]: https://github.com/Cubicpath/ChatGPT-GUI/blob/master/LICENSE \"MIT License\"\n[PySide]: https://pypi.org/project/PySide6/ \"PySide6\"\n[python]: https://www.python.org \"Python\"\n[python310]: https://www.python.org/downloads/release/python-3100/ \"Python 3.10\"\n[rawandahmad698]: https://github.com/rawandahmad698 \"rawandahmad698\"\n[python-tls-client]: https://github.com/FlorianREGAZ/Python-Tls-Client \"tls-client\"\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "An unofficial GUI app for ChatGPT.",
    "version": "0.4.1",
    "split_keywords": [
        "ai",
        "gpt",
        "gui",
        "app",
        "client",
        "unofficial",
        "chatgpt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "234f5722dd392c0dc6f82550620d2459",
                "sha256": "f7731136298022847cf222e036c879cd0cc31f19144574e5ae36dfc0207e9ecd"
            },
            "downloads": -1,
            "filename": "chatgpt_gui-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "234f5722dd392c0dc6f82550620d2459",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 200504,
            "upload_time": "2022-12-17T01:37:13",
            "upload_time_iso_8601": "2022-12-17T01:37:13.733134Z",
            "url": "https://files.pythonhosted.org/packages/d8/e6/e98186c8df842b10d1400f36cb532d8f273c017cb90350f01a49c0a6f218/chatgpt_gui-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ed160909c48d273fb102ff81b5be495b",
                "sha256": "b8473f45b86c353c4021ff571aa280fbd63736815852e2cabfcff24dc7d44ed6"
            },
            "downloads": -1,
            "filename": "chatgpt-gui-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ed160909c48d273fb102ff81b5be495b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 138339,
            "upload_time": "2022-12-17T01:37:15",
            "upload_time_iso_8601": "2022-12-17T01:37:15.377185Z",
            "url": "https://files.pythonhosted.org/packages/bb/b6/3b775a9aa020670728673e09398e03fd5f8aee132015699819300bc7b47d/chatgpt-gui-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-17 01:37:15",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "chatgpt-gui"
}
        
Elapsed time: 0.01948s