1
0
mirror of https://github.com/lencx/ChatGPT.git synced 2024-10-01 01:06:13 -04:00
Unofficial_ChatGPT_Client/README.md

263 lines
13 KiB
Markdown
Raw Normal View History

2022-12-07 07:02:31 -05:00
<p align="center">
2022-12-13 06:10:42 -05:00
<img width="180" src="./public/logo.png" alt="ChatGPT">
2022-12-07 07:02:31 -05:00
<h1 align="center">ChatGPT</h1>
2023-01-06 06:43:22 -05:00
<p align="center">ChatGPT Desktop Application (Mac, Windows and Linux)</p>
2022-12-07 07:02:31 -05:00
</p>
2022-12-12 23:47:20 -05:00
[![English badge](https://img.shields.io/badge/%E8%8B%B1%E6%96%87-English-blue)](./README.md)
2023-01-03 22:29:41 -05:00
[![简体中文 badge](https://img.shields.io/badge/%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-Simplified%20Chinese-blue)](./README-ZH_CN.md)\
![License](https://img.shields.io/badge/License-Apache%202-green.svg)
2022-12-10 12:55:30 -05:00
[![ChatGPT downloads](https://img.shields.io/github/downloads/lencx/ChatGPT/total.svg?style=flat-square)](https://github.com/lencx/ChatGPT/releases)
2022-12-15 06:46:19 -05:00
[![chat](https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord)](https://discord.gg/aPhCRf4zZr)
2023-01-22 02:01:08 -05:00
[![lencx](https://img.shields.io/badge/follow-lencx__-blue?style=flat&logo=Twitter)](https://twitter.com/lencx_)
2023-01-22 05:18:36 -05:00
2023-01-22 02:01:08 -05:00
<!-- [![lencx](https://img.shields.io/twitter/follow/lencx_.svg?style=social)](https://twitter.com/lencx_) -->
2022-12-23 04:51:41 -05:00
2022-12-15 04:16:12 -05:00
<!-- [![中文版 badge](https://img.shields.io/badge/%E4%B8%AD%E6%96%87-Traditional%20Chinese-blue)](./README-ZH.md) -->
2022-12-10 12:55:30 -05:00
2023-01-04 20:41:09 -05:00
<a href="https://www.buymeacoffee.com/lencx" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy Me A Coffee" style="height: 40px !important;width: 145px !important;" ></a>
## 📦 Install
2022-12-07 23:22:27 -05:00
2023-01-05 01:57:50 -05:00
- [📝 Update Log](./UPDATE_LOG.md)
- [🕒 History versions...](https://github.com/lencx/ChatGPT/releases)
2022-12-12 01:12:29 -05:00
2022-12-09 23:18:35 -05:00
<!-- download start -->
2023-01-04 20:41:09 -05:00
### Windows
2022-12-07 23:22:27 -05:00
2023-01-25 06:20:47 -05:00
- [ChatGPT_0.10.1_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.10.1/ChatGPT_0.10.1_x64_en-US.msi): Direct download installer
2023-01-06 03:29:59 -05:00
- Use [winget](https://winstall.app/apps/lencx.ChatGPT):
2023-01-22 05:18:36 -05:00
2023-01-06 03:29:59 -05:00
```bash
# install the latest version
winget install --id=lencx.ChatGPT -e
# install the specified version
2023-01-25 06:20:47 -05:00
winget install --id=lencx.ChatGPT -e --version 0.10.0
2023-01-06 03:29:59 -05:00
```
2023-01-04 23:24:02 -05:00
2023-01-25 06:20:47 -05:00
**Note: If the installation path and application name are the same, it will lead to conflict ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.10.1))**
2023-01-02 05:10:02 -05:00
2023-01-04 20:41:09 -05:00
### Mac
2022-12-10 12:29:20 -05:00
2023-01-25 06:20:47 -05:00
- [ChatGPT_0.10.1_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.10.1/ChatGPT_0.10.1_x64.dmg): Direct download installer
- [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.10.1/ChatGPT.app.tar.gz): Download the `.app` installer
2023-01-04 22:48:43 -05:00
- Homebrew \
2023-01-04 22:45:01 -05:00
Or you can install with _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
```sh
brew tap lencx/chatgpt https://github.com/lencx/ChatGPT.git
brew install --cask chatgpt --no-quarantine
```
Also, if you keep a _[Brewfile](https://github.com/Homebrew/homebrew-bundle#usage)_, you can add something like this:
```rb
repo = "lencx/chatgpt"
tap repo, "https://github.com/#{repo}.git"
cask "chatgpt", args: { "no-quarantine": true }
```
2022-12-10 12:29:20 -05:00
2023-01-04 20:41:09 -05:00
### Linux
2023-01-25 06:20:47 -05:00
- [chat-gpt_0.10.1_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.10.1/chat-gpt_0.10.1_amd64.deb): Download `.deb` installer, advantage small size, disadvantage poor compatibility
- [chat-gpt_0.10.1_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.10.1/chat-gpt_0.10.1_amd64.AppImage): Works reliably, you can try it if `.deb` fails to run
2023-01-06 05:44:35 -05:00
- Available on [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin) with the package name `chatgpt-desktop-bin`, and you can use your favourite AUR package manager to install it.
2023-01-04 20:41:09 -05:00
<!-- download end -->
2022-12-17 01:29:46 -05:00
## 📢 Announcement
2023-01-03 06:42:25 -05:00
### ChatGPT Prompts!
2023-01-04 20:41:09 -05:00
2022-12-17 01:29:46 -05:00
This is a major and exciting update. It works like a `Telegram bot command` and helps you quickly populate custom models to make chatgpt work the way you want it to. This project has taken a lot of my spare time, so if it helps you, please help spread the word or star it would be a great encouragement to me. I hope I can keep updating it and adding more interesting features.
### How does it work?
2023-01-06 03:29:59 -05:00
You can look at **[awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts)** to find interesting features to import into the app. You can also use `Sync Prompts` to sync all in one click, and if you don't want certain prompts to appear in your slash commands, you can disable them.
2022-12-17 01:29:46 -05:00
2023-01-16 08:06:24 -05:00
![chatgpt cmd](./assets/chatgpt-cmd.png)
2023-01-06 05:44:35 -05:00
![chatgpt sync prompts](./assets/chatgpt-sync-prompts.png)
2022-12-17 01:29:46 -05:00
2022-12-29 06:29:33 -05:00
<!-- After the data import is done, you can restart the app to make the configuration take effect (`Menu -> Preferences -> Restart ChatGPT`). -->
2022-12-17 01:29:46 -05:00
2023-01-03 22:29:41 -05:00
- In the chatgpt text input area, type a character starting with `/` to bring up the command prompt, press the spacebar, and it will fill the input area with the text associated with the command by default (note: if it contains multiple command prompts, it will only select the first one as the fill, you can keep typing until the first prompted command is the one you want, then press the spacebar.
- Or use the mouse to click on one of the multiple commands). When the fill is complete, you simply press the Enter key.
2023-01-03 06:42:25 -05:00
- Under the slash command, use the tab key to modify the contents of the `{q}` tag (only single changes are supported [#54](https://github.com/lencx/ChatGPT/issues/54)). Use the keyboard `⇧` (arrow up) and `⇩` (arrow down) keys to select the slash command.
2022-12-17 01:29:46 -05:00
2022-12-17 04:31:29 -05:00
![chatgpt](assets/chatgpt.gif)
2022-12-23 05:58:10 -05:00
![chatgpt-cmd](assets/chatgpt-cmd.gif)
2022-12-17 04:31:29 -05:00
2022-12-12 01:12:29 -05:00
## ✨ Features
2022-12-07 07:02:31 -05:00
2022-12-13 07:02:28 -05:00
- Multi-platform: `macOS` `Linux` `Windows`
2023-01-14 13:12:29 -05:00
- Export ChatGPT history (PNG, PDF and Markdown)
2023-01-24 21:26:53 -05:00
- The main window and system tray support custom URLs to wrap any website into a desktop application
2022-12-13 07:02:28 -05:00
- Automatic application upgrade notification
- Common shortcut keys
- System tray hover window
- Powerful menu items
2022-12-23 06:18:40 -05:00
- Support for slash commands and their configuration (can be configured manually or synchronized from a file [#55](https://github.com/lencx/ChatGPT/issues/55))
2022-12-31 07:11:15 -05:00
- Customize global shortcuts ([#108](https://github.com/lencx/ChatGPT/issues/108))
2023-01-06 23:11:13 -05:00
- Pop-up Search ([#122](https://github.com/lencx/ChatGPT/issues/122) mouse selected content, no more than 400 characters): The application is built using Tauri, and due to its security restrictions, some of the action buttons will not work, so we recommend going to your browser.
2022-12-07 07:02:31 -05:00
2023-01-06 06:43:22 -05:00
## #️⃣ MenuItem
2022-12-11 13:11:29 -05:00
- **Preferences**
2023-01-06 06:43:22 -05:00
- `Theme` - `Light`, `Dark`, `System` (Only macOS and Windows are supported).
2022-12-15 22:43:29 -05:00
- `Stay On Top`: The window is stay on top of other windows.
2022-12-13 07:02:28 -05:00
- `Titlebar`: Whether to display the titlebar, supported by macOS only.
2022-12-15 22:43:29 -05:00
- `Hide Dock Icon` ([#35](https://github.com/lencx/ChatGPT/issues/35)): Hide application icons from the Dock(support macOS only).
2022-12-17 03:23:35 -05:00
- Right-click on the SystemTray to open the menu, then click `Show Dock Icon` in the menu item to re-display the application icon in the Dock (`SystemTrayMenu -> Show Dock Icon`).
2022-12-13 07:02:28 -05:00
- `Inject Script`: Using scripts to modify pages.
2022-12-14 22:39:21 -05:00
- `Control Center`: The control center of ChatGPT application, it will give unlimited imagination to the application.
2022-12-15 22:43:29 -05:00
- `Theme`, `Stay On Top`, `Titlebar`, ...
2022-12-14 22:49:37 -05:00
- `User Agent` ([#17](https://github.com/lencx/ChatGPT/issues/17)): Custom `user agent`, which may be required in some scenarios. The default value is the empty string.
- `Switch Origin` ([#14](https://github.com/lencx/ChatGPT/issues/14)): Switch the site source address, the default is `https://chat.openai.com`, please make sure the mirror site UI is the same as the original address. Otherwise, some functions may not be available.
2022-12-12 10:03:46 -05:00
- `Go to Config`: Open the configuration file directory (`path: ~/.chatgpt/*`).
2022-12-13 07:02:28 -05:00
- `Clear Config`: Clear the configuration file (`path: ~/.chatgpt/*`), dangerous operation, please backup the data in advance.
- `Restart ChatGPT`: Restart the application, for example: the program is stuck or the injection script can take effect by restarting the application after editing.
- `Awesome ChatGPT`: Recommended Related Resources.
2022-12-11 13:11:29 -05:00
- **Edit** - `Undo`, `Redo`, `Cut`, `Copy`, `SelectAll`, ...
- **View** - `Go Back`, `Go Forward`, `Scroll to Top of Screen`, `Scroll to Bottom of Screen`, `Refresh the Screen`, ...
- **Help**
2022-12-13 07:02:28 -05:00
- `Update Log`: ChatGPT changelog.
- `Report Bug`: Report a bug or give feedback.
- `Toggle Developer Tools`: Developer debugging tools.
2022-12-11 13:11:29 -05:00
2023-01-06 06:43:22 -05:00
## ⚙️ Application Configuration
2022-12-23 04:51:41 -05:00
| Platform | Path |
| -------- | ------------------------- |
| Linux | `/home/lencx/.chatgpt` |
| macOS | `/Users/lencx/.chatgpt` |
| Windows | `C:\Users\lencx\.chatgpt` |
- `[.chatgpt]` - application configuration root folder
- `chat.conf.json` - preferences configuration
2023-01-24 21:32:19 -05:00
- `chat.awesome.json` - Custom URL lists, similar to browser bookmarks. Any URL can be used as the main window or tray window (**Control Conter -> Awesome**)
2022-12-23 04:51:41 -05:00
- `chat.model.json` - prompts configurationcontains three parts:
- `user_custom` - Requires manual data entry (**Control Conter -> Language Model -> User Custom**)
- `sync_prompts` - Synchronizing data from [f/awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) (**Control Conter -> Language Model -> Sync Prompts**)
- `sync_custom` - Synchronize custom json and csv file data, support local and remote (**Control Conter -> Language Model -> Sync Custom**)
- `chat.model.cmd.json` - filtered (whether to enable) and sorted slash commands
- `[cache_model]` - caching model data
- `chatgpt_prompts.json` - Cache `sync_prompts` data
- `user_custom.json` - Cache `user_custom` data
- `ae6cf32a6f8541b499d6bfe549dbfca3.json` - Randomly generated file names, cache `sync_custom` data
- `4f695d3cfbf8491e9b1f3fab6d85715c.json` - Randomly generated file names, cache `sync_custom` data
- `bd1b96f15a1644f7bd647cc53073ff8f.json` - Randomly generated file names, cache `sync_custom` data
### Sync Custom
Currently, only json and csv are supported for synchronizing custom files, and the following formats need to be met, otherwise the application will be abnormal
2023-01-04 22:45:01 -05:00
`JSON format:`
2022-12-23 04:51:41 -05:00
```json
[
{
"cmd": "a",
"act": "aa",
"prompt": "aaa aaa aaa"
},
{
"cmd": "b",
"act": "bb",
"prompt": "bbb bbb bbb"
}
]
```
2023-01-04 22:45:01 -05:00
`CSV format`
2022-12-23 04:51:41 -05:00
```csv
"cmd","act","prompt"
"a","aa","aaa aaa aaa"
"b","bb","bbb bbb bbb"
```
2023-01-06 06:43:22 -05:00
## 📌 TODO
2022-12-12 06:19:10 -05:00
2022-12-27 01:54:10 -05:00
<!-- - Web access capability ([#20](https://github.com/lencx/ChatGPT/issues/20)) -->
2023-01-22 05:18:36 -05:00
2023-01-06 23:25:30 -05:00
- `Control Center` enhancement
- `Pop-up Search` enhancement
2022-12-12 06:19:10 -05:00
- ...
2022-12-12 03:26:09 -05:00
## 👀 Preview
2022-12-07 07:02:31 -05:00
2023-01-06 23:11:13 -05:00
<img width="320" src="./assets/install.png" alt="install"> <img width="320" src="./assets/chatgpt-popup-search.png" alt="popup search">
<img width="320" src="./assets/chatgpt-control-center-general.png" alt="control center"> <img width="320" src="./assets/chatgpt-export.png" alt="export">
<img width="320" src="./assets/chatgpt-dalle2-tray.png" alt="dalle2 tray"> <img width="320" src="./assets/auto-update.png" alt="auto update">
2022-12-10 09:29:29 -05:00
2022-12-12 03:26:09 -05:00
## ❓FAQ
2022-12-07 23:22:27 -05:00
2023-01-03 11:50:06 -05:00
### Can't open ChatGPT
2022-12-11 23:40:15 -05:00
2022-12-13 07:02:28 -05:00
If you cannot open the application after the upgrade, please try to clear the configuration file, which is in the `~/.chatgpt/*` directory.
2022-12-11 23:40:15 -05:00
2023-01-03 11:50:06 -05:00
### Out of sync login status between multiple windows
2022-12-15 00:25:48 -05:00
If you have already logged in in the main window, but the system tray window shows that you are not logged in, you can fix it by restarting the application (`Menu -> Preferences -> Restart ChatGPT`).
2023-01-03 11:50:06 -05:00
### Is it safe?
2022-12-07 23:22:27 -05:00
2022-12-07 23:26:26 -05:00
It's safe, just a wrapper for [OpenAI ChatGPT](https://chat.openai.com) website, no other data transfer exists (you can check the source code).
2022-12-07 23:22:27 -05:00
2023-01-03 11:50:06 -05:00
### Developer cannot be verified?
2022-12-09 14:29:50 -05:00
- [Open a Mac app from an unidentified developer](https://support.apple.com/en-sg/guide/mac-help/mh40616/mac)
2023-01-06 06:43:22 -05:00
---
2023-01-10 11:10:18 -05:00
### How do I build it?
2022-12-07 23:22:27 -05:00
#### PreInstall
2023-01-12 23:18:49 -05:00
- [Rust (Required)](https://www.rust-lang.org/)
- [Node.js (Required)](https://nodejs.org/)
- [VS Code (Optional)](https://code.visualstudio.com/)
2022-12-07 23:22:27 -05:00
- [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
- [tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode)
#### Start
```bash
# step1:
git clone https://github.com/lencx/ChatGPT.git
# step2:
cd ChatGPT
# step3: install deps
yarn
# step4:
yarn dev
# step5:
# bundle path: src-tauri/target/release/bundle
yarn build
```
2022-12-09 14:29:50 -05:00
2023-01-12 23:18:49 -05:00
- [The distDir configuration is set to "../dist" but this path doesn't exist](https://github.com/lencx/ChatGPT/discussions/180)
- [Error A public key has been found, but no private key. Make sure to set TAURI_PRIVATE_KEY environment variable.](https://github.com/lencx/ChatGPT/discussions/182)
2022-12-12 03:26:09 -05:00
## ❤️ Thanks
2022-12-13 07:02:28 -05:00
- The core implementation of the share button code was copied from the [@liady](https://github.com/liady) extension with some modifications.
2022-12-17 03:37:19 -05:00
- Thanks to the [Awesome ChatGPT Prompts](https://github.com/f/awesome-chatgpt-prompts) repository for inspiring the custom command function for this application.
2022-12-12 03:26:09 -05:00
2022-12-12 23:47:20 -05:00
---
2023-01-01 04:40:06 -05:00
[![Star History Chart](https://api.star-history.com/svg?repos=lencx/chatgpt&type=Timeline)](https://star-history.com/#lencx/chatgpt&Timeline)
2022-12-12 23:47:20 -05:00
2022-12-15 06:43:14 -05:00
## 中国用户
国内用户如果遇到使用问题或者想交流 ChatGPT 技巧,可以关注公众号“浮之静”,发送 “chat” 进群参与讨论。公众号会更新[《Tauri 系列》](https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzIzNjE2NTI3NQ==&action=getalbum&album_id=2593843659863752704)文章,技术思考等等,如果对 tauri 开发应用感兴趣可以关注公众号后回复 “tauri” 进技术开发群(想私聊的也可以关注公众号,来添加微信)。开源不易,如果这个项目对你有帮助可以分享给更多人,或者微信扫码打赏。
<img width="180" src="https://user-images.githubusercontent.com/16164244/207228300-ea5c4688-c916-4c55-a8c3-7f862888f351.png"> <img width="200" src="https://user-images.githubusercontent.com/16164244/207228025-117b5f77-c5d2-48c2-a070-774b7a1596f2.png">
2022-12-12 23:47:20 -05:00
## License
2022-12-09 14:29:50 -05:00
2022-12-13 01:21:23 -05:00
Apache License