[![PyPi](https://img.shields.io/pypi/v/chatgpt-mixin.svg)](https://pypi.org/project/chatgpt-mixin)
[![PyPi](https://img.shields.io/pypi/dm/chatgpt-mixin.svg)](https://pypi.org/project/chatgpt-mixin)
# chatgpt-mixin
![Demo](./images/demo.png)
Demo bot: 7000101691
# Installation
on unix like platform, install `chatgpt-mixin` with the following command:
```bash
python3 -m pip install -U chatgpt-mixin
```
on the Windows platform, use the following command to install `chatgpt-mixin`:
```bash
python -m pip install -U chatgpt-mixin
```
Install chatgpt-mixin with the support of accessing openai model in a browser:
```bash
python3 -m pip install -U chatgpt-mixin[browser]
playwright install firefox
```
# configuration
First, you need to create a mixin bot from [developers.mixin.one](https://developers.mixin.one/dashboard).
And then under the `Secret` tab, click `Ed25519 session` to generate an App Session configuration.
To get started, you will need at least one ChatGPT account. If you don't have one already, you can create an account at [chat.openai.com](https://chat.openai.com/chat). Additionally, you can create an api key at [platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)."
After that, you can start this bot with the following command:
```bash
python3 -m chatgpt_mixin bot-config.yaml
```
which bot-config.yaml contains mixin bot configuration and chatgpt accounts as shown below.
```yaml
bot_config:
pin: ""
client_id: ""
session_id: ""
pin_token: ""
private_key: ""
openai_api_keys: []
accounts:
- user: ""
psw: ""
```
`bot_config` section specify mixin bot configure. `openai_api_keys` section specify openai api keys. `accounts` section specify chatgpt test accounts. `user` field can not be empty, but you can leave `psw` to empty. If it is left empty, the user will need to manually enter the password upon login. Multiple accounts can be specified in the accounts section to improve ChatGPT responses. You can leave `accounts` section to empty if you only need to access openai models with `openai_api_keys`.
If you are running a bot of accessing model via browser in a server, you need to install `Xvfb` on the server, and use `VNC` at the client side to connect to `Xvfb`. For more information, refer to [Remote_control_over_SSH](https://en.wikipedia.org/wiki/Xvfb#Remote_control_over_SSH).
On the first time you start this bot, automated processes such as auto-filling of account names and passwords will be carried out, but you will still need to manually solve CAPTCHAs during the login process.
# Helpfull Commands
This is a list of helpful commands to use with the bot.
## /role
The `/role` command is used to get or set the role of the bot.
### Set role
To set the role of the bot, use the following format:
Usage:
```
/role <role description>
```
Example:
```
/role You are a helpful assistant
```
### Get role
To get the current role of the bot, use the following command:
```
/role
```
The bot will respond with the current role.
## /reset_role
The `/reset_role` command is used to reset the role of the bot to the default role.
Usage:
```
/reset_role
```
## /reset
The `/reset` command is used to clear the context of the bot.
Usage:
```
/reset
```
These commands should help you better interact with the bot.
# Acknowledgements
- [chatgpt-api](https://github.com/transitive-bullshit/chatgpt-api)
- [chatGPT-telegram-bot](https://github.com/altryne/chatGPT-telegram-bot)
- [ChatGPT](https://github.com/ChatGPT-Hackers/ChatGPT)
Raw data
{
"_id": null,
"home_page": "https://github.com/learnforpractice/chatgpt-mixin",
"name": "chatgpt-mixin",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "learnforpractice",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/6a/bf/b851e0eeb1f0eefabb0373a0514bb2b9d285014ee5c7595a78c237be4e17/chatgpt-mixin-0.1.8.tar.gz",
"platform": null,
"description": "[![PyPi](https://img.shields.io/pypi/v/chatgpt-mixin.svg)](https://pypi.org/project/chatgpt-mixin)\n[![PyPi](https://img.shields.io/pypi/dm/chatgpt-mixin.svg)](https://pypi.org/project/chatgpt-mixin)\n\n# chatgpt-mixin\n\n![Demo](./images/demo.png)\n\nDemo bot: 7000101691\n\n# Installation\n\non unix like platform, install `chatgpt-mixin` with the following command:\n\n```bash\npython3 -m pip install -U chatgpt-mixin\n```\n\non the Windows platform, use the following command to install `chatgpt-mixin`:\n\n```bash\npython -m pip install -U chatgpt-mixin\n```\n\nInstall chatgpt-mixin with the support of accessing openai model in a browser:\n\n```bash\npython3 -m pip install -U chatgpt-mixin[browser]\nplaywright install firefox\n```\n\n# configuration\n\nFirst, you need to create a mixin bot from [developers.mixin.one](https://developers.mixin.one/dashboard).\nAnd then under the `Secret` tab, click `Ed25519 session` to generate an App Session configuration.\n\nTo get started, you will need at least one ChatGPT account. If you don't have one already, you can create an account at [chat.openai.com](https://chat.openai.com/chat). Additionally, you can create an api key at [platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys).\" \n\nAfter that, you can start this bot with the following command:\n\n```bash\npython3 -m chatgpt_mixin bot-config.yaml\n```\n\nwhich bot-config.yaml contains mixin bot configuration and chatgpt accounts as shown below.\n\n```yaml\nbot_config:\n pin: \"\"\n client_id: \"\"\n session_id: \"\"\n pin_token: \"\"\n private_key: \"\"\nopenai_api_keys: []\naccounts:\n - user: \"\"\n psw: \"\"\n```\n\n`bot_config` section specify mixin bot configure. `openai_api_keys` section specify openai api keys. `accounts` section specify chatgpt test accounts. `user` field can not be empty, but you can leave `psw` to empty. If it is left empty, the user will need to manually enter the password upon login. Multiple accounts can be specified in the accounts section to improve ChatGPT responses. You can leave `accounts` section to empty if you only need to access openai models with `openai_api_keys`.\n\nIf you are running a bot of accessing model via browser in a server, you need to install `Xvfb` on the server, and use `VNC` at the client side to connect to `Xvfb`. For more information, refer to [Remote_control_over_SSH](https://en.wikipedia.org/wiki/Xvfb#Remote_control_over_SSH).\n\n\nOn the first time you start this bot, automated processes such as auto-filling of account names and passwords will be carried out, but you will still need to manually solve CAPTCHAs during the login process.\n\n\n# Helpfull Commands\n\nThis is a list of helpful commands to use with the bot.\n\n## /role\n\nThe `/role` command is used to get or set the role of the bot.\n\n### Set role\n\nTo set the role of the bot, use the following format:\n\nUsage:\n```\n/role <role description>\n```\n\nExample:\n```\n/role You are a helpful assistant\n```\n\n### Get role\n\nTo get the current role of the bot, use the following command:\n\n```\n/role\n```\n\nThe bot will respond with the current role.\n\n## /reset_role\n\nThe `/reset_role` command is used to reset the role of the bot to the default role.\n\nUsage:\n```\n/reset_role\n```\n\n## /reset\n\nThe `/reset` command is used to clear the context of the bot.\n\nUsage:\n```\n/reset\n```\n\nThese commands should help you better interact with the bot.\n\n\n# Acknowledgements\n\n- [chatgpt-api](https://github.com/transitive-bullshit/chatgpt-api)\n- [chatGPT-telegram-bot](https://github.com/altryne/chatGPT-telegram-bot)\n- [ChatGPT](https://github.com/ChatGPT-Hackers/ChatGPT)\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "ChatGPT Bot For Mixin",
"version": "0.1.8",
"project_urls": {
"Homepage": "https://github.com/learnforpractice/chatgpt-mixin"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b859a0e19ea5d32d98c6b70830ceab3fefed30fb535fa4944b6288d3e4f96d67",
"md5": "d869971770752fa6912f4979162b2f8a",
"sha256": "d435cc1e794b17133ea7d37a1a4d7285f50a9c58ea692c103c6d4c06f389d331"
},
"downloads": -1,
"filename": "chatgpt_mixin-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d869971770752fa6912f4979162b2f8a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 17488,
"upload_time": "2023-05-30T07:00:37",
"upload_time_iso_8601": "2023-05-30T07:00:37.532933Z",
"url": "https://files.pythonhosted.org/packages/b8/59/a0e19ea5d32d98c6b70830ceab3fefed30fb535fa4944b6288d3e4f96d67/chatgpt_mixin-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6abfb851e0eeb1f0eefabb0373a0514bb2b9d285014ee5c7595a78c237be4e17",
"md5": "76bc886b869d1eff30468d4548c8c3fb",
"sha256": "a6acf419392b1571f6043a18dac5541d896cb540d81355f21e24f0a3b392ec97"
},
"downloads": -1,
"filename": "chatgpt-mixin-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "76bc886b869d1eff30468d4548c8c3fb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15523,
"upload_time": "2023-05-30T07:00:39",
"upload_time_iso_8601": "2023-05-30T07:00:39.372003Z",
"url": "https://files.pythonhosted.org/packages/6a/bf/b851e0eeb1f0eefabb0373a0514bb2b9d285014ee5c7595a78c237be4e17/chatgpt-mixin-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-30 07:00:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "learnforpractice",
"github_project": "chatgpt-mixin",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "chatgpt-mixin"
}