{"id":13543318,"url":"https://github.com/TheExplainthis/ChatGPT-Line-Bot","last_synced_at":"2025-04-02T12:32:09.427Z","repository":{"id":79222139,"uuid":"604408050","full_name":"TheExplainthis/ChatGPT-Line-Bot","owner":"TheExplainthis","description":"This is a repository that allows you to integrate ChatGPT into Line.","archived":false,"fork":false,"pushed_at":"2024-05-04T20:22:41.000Z","size":5154,"stargazers_count":1655,"open_issues_count":36,"forks_count":1997,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T20:09:24.599Z","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/TheExplainthis.png","metadata":{"files":{"readme":"README.en.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-02-21T01:57:15.000Z","updated_at":"2025-03-29T14:28:02.000Z","dependencies_parsed_at":"2024-01-14T09:09:18.839Z","dependency_job_id":"ca19286c-0591-45e6-b161-e59d2ec1794c","html_url":"https://github.com/TheExplainthis/ChatGPT-Line-Bot","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Line-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Line-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Line-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Line-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheExplainthis","download_url":"https://codeload.github.com/TheExplainthis/ChatGPT-Line-Bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246815825,"owners_count":20838523,"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-08-01T11:00:29.670Z","updated_at":"2025-04-02T12:32:04.415Z","avatar_url":"https://github.com/TheExplainthis.png","language":"Python","funding_links":["https://www.buymeacoffee.com/explainthis"],"categories":["精选开源项目合集","🔧 Others"],"sub_categories":["第三方机器人接入"],"readme":"# ChatGPT Line Bot\n\n[中文](README.md) | English\n\n[![license](https://img.shields.io/pypi/l/ansicolortags.svg)](LICENSE) [![Release](https://img.shields.io/github/v/release/TheExplainthis/ChatGPT-Line-Bot)](https://github.com/TheExplainthis/ChatGPT-Line-Bot/releases/)\n\n\n## Update\n- 2023/03/23 Update summary of Youtube videos and news articles (supports: United Daily News, SET, Yahoo News, Central News Agency, Storm Media, TVBS, Liberty Times, ETtoday, China Times, Line News, TTV News)\n- 2023/03/18 Added Whisper service, users can now add their own tokens, and added command (refer to the documentation below)\n- 2023/03/03 Model change to chat completion: `gpt-3.5-turbo`\n\n\n## Introduction\nImport the ChatGPT bot to Line and start interacting with it by simply typing text in the input box. In addition to ChatGPT, the model for DALL·E 2 is also integrated. Enter `/imagine + text` to return the corresponding image, as shown in the figure below:\n\n![Demo](https://github.com/TheExplainthis/ChatGPT-Line-Bot/blob/main/demo/chatgpt-line-bot.gif)\n\n## Installation Steps\n### Token Retrieval\n1. Retrieve the OpenAI API Token:\n    1. Register/login to your [OpenAI](https://beta.openai.com/) account.\n    2. Click on the avatar on the top right corner and select `View API keys`.\n    3. Click on `Create new secret key` in the middle, and the generated token will be `OPENAI_API` (to be used later).\n    - Note: Each API has a free quota and restrictions. For details, please refer to [OpenAI Pricing](https://openai.com/api/pricing/).\n2. Retrieve the Line Token:\n    1. Login to [Line Developer](https://developers.line.biz/zh-hant/).\n    2. Create a bot:\n        1. Create a `Provider` -\u003e click `Create`.\n        2. Create a `Channel` -\u003e select `Create a Messaging API channel`.\n        3. Enter the required basic information.\n        4. After completion, there is a `Channel Secret` under `Basic Settings` -\u003e click `Issue`, and the generated token will be `LINE_CHANNEL_SECRET` (to be used later).\n        5. Under `Messaging API`, there is a `Channel access token` -\u003e click `Issue`, and the generated token will be `LINE_CHANNEL_ACCESS_TOKEN` (to be used later).\n\n### Project Setup\n1. Fork the Github project:\n    1. Register/login to [GitHub](https://github.com/).\n    2. Go to [ChatGPT-Line-Bot](https://github.com/TheExplainthis/ChatGPT-Line-Bot).\n    3. Click `Star` to support the developer.\n    4. Click `Fork` to copy all the code to your own repository.\n2. Deploy (free space):\n    1. Go to [replit](https://replit.com/).\n    2. Click `Sign Up` and log in with your `Github` account and authorize it -\u003e click `Skip` to skip the initialization settings.\n    3. On the main page in the middle, click `Create` -\u003e a pop-up window will appear, click `Import from Github` on the upper right corner.\n    4. If you have not added the Github repository, click the link `Connect GitHub to import your private repos.` -\u003e check `Only select repositories` -\u003e select `ChatGPT-Line-Bot`.\n    5. Go back to step 4. At this point, the `Github URL` can select the `ChatGPT-Line-Bot` project -\u003e click `Import from Github`.\n\n### Project Execution\n1. Environment variables setting:\n    1. After completing the previous step of `Import`, click on `Tools` at the bottom left of the project management page in `Replit`, then click on `Secrets`.\n    2. Click on `Got it` on the right side to add environment variables, which includes:\n        1. Desired model:\n            - key: `OPENAI_MODEL_ENGINE`\n            - value: `gpt-3.5-turbo`\n        2. ChatGPT wants the assistant to play the role of a keyword (currently, no further usage instructions have been officially released, and players can test it themselves).\n            - key: `SYSTEM_MESSAGE`\n            - value: `You are a helpful assistant.`\n        3. Line Channel Secret:\n            - key: `LINE_CHANNEL_SECRET`\n            - value: `[obtained from step one]`\n        4. Line Channel Access Token:\n            - key: `LINE_CHANNEL_ACCESS_TOKEN`\n            - value: `[obtained from step one]`\n2. Start running:\n    1. Click on `Run` on the top.\n    2. After successful, the right-side screen will display `Hello World`, and the **URL** on the top of the screen should be copied down.\n    3. Go back to Line Developer, paste the **URL** above `Webhook URL` under `Messaging API`, and add `/callback` to the end, for example: `https://ChatGPT-Line-Bot.explainthis.repl.co/callback`\n    4. Turn on `Use webhook` below.\n    5. Turn off `Auto-reply messages` below.\n    - Note: if there is no request within an hour, the program will be interrupted, so the following steps are needed.\n3. CronJob scheduled request sending:\n    1. Register/Login to [cron-job.org](https://cron-job.org/en/)\n    2. In the upper right corner of the panel, select `CREATE CRONJOB`\n    3. Enter `ChatGPT-Line-Bot` in the Title field, and enter the URL from the previous step, for example: `https://ChatGPT-Line-Bot.explainthis.repl.co/`\n    4. Send a request every `5 minutes` below\n    5. Click on `CREATE`\n\n## Commands\nTo start a conversation with ChatGPT, simply type your message in the text input box. Other available commands include:\n\n\n| Command | Description |\n| ------- | ----------- |\n| `/註冊` | Enter `/註冊` + OpenAI API Token in the input box to register your token|\n| `/系統訊息` | Enter `/系統訊息` + the role you want ChatGPT to play in the input box|\n| `/清除` | Enter `/清除` in the input box to clear the chat history|\n| `/圖像` | Enter `/圖像` + command in the input box to call the DALL·E 2 model and generate an image|\n| Voice input | Use voice input, the system will automatically translate the voice into text, and ChatGPT will respond in text| \n| Text input | Directly input text to enter the normal ChatGPT conversation mode|\n\n\n## Support Us\nLike this free project? Please consider [supporting us](https://www.buymeacoffee.com/explainthis) to keep it running.\n\n[\u003ca href=\"https://www.buymeacoffee.com/explainthis\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"45px\" width=\"162px\" alt=\"Buy Me A Coffee\"\u003e\u003c/a\u003e](https://www.buymeacoffee.com/explainthis)\n\n## Related Projects\n- [gpt-ai-assistant](https://github.com/memochou1993/gpt-ai-assistant)\n- [ChatGPT-Discord-Bot](https://github.com/TheExplainthis/ChatGPT-Discord-Bot)\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheExplainthis%2FChatGPT-Line-Bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheExplainthis%2FChatGPT-Line-Bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheExplainthis%2FChatGPT-Line-Bot/lists"}