{"id":18769413,"url":"https://github.com/learnforpractice/chatgpt-mixin","last_synced_at":"2025-04-13T07:31:18.972Z","repository":{"id":65121298,"uuid":"578052183","full_name":"learnforpractice/chatgpt-mixin","owner":"learnforpractice","description":"a CHATGPT bot for Mixin","archived":false,"fork":false,"pushed_at":"2024-05-24T13:30:41.000Z","size":1195,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T03:49:42.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/learnforpractice.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}},"created_at":"2022-12-14T06:19:01.000Z","updated_at":"2024-05-24T13:30:44.000Z","dependencies_parsed_at":"2023-02-09T19:00:29.139Z","dependency_job_id":null,"html_url":"https://github.com/learnforpractice/chatgpt-mixin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnforpractice%2Fchatgpt-mixin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnforpractice%2Fchatgpt-mixin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnforpractice%2Fchatgpt-mixin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnforpractice%2Fchatgpt-mixin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/learnforpractice","download_url":"https://codeload.github.com/learnforpractice/chatgpt-mixin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223573772,"owners_count":17167369,"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-11-07T19:15:47.024Z","updated_at":"2024-11-07T19:15:47.489Z","avatar_url":"https://github.com/learnforpractice.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![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 \u003crole description\u003e\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnforpractice%2Fchatgpt-mixin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearnforpractice%2Fchatgpt-mixin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnforpractice%2Fchatgpt-mixin/lists"}