中文 | English
- 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)
- 2023/03/18 Added Whisper service, users can now add their own tokens, and added command (refer to the documentation below)
- 2023/03/03 Model change to chat completion:
gpt-3.5-turbo
Import 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:
- Retrieve the OpenAI API Token:
- Register/login to your OpenAI account.
- Click on the avatar on the top right corner and select
View API keys. - Click on
Create new secret keyin the middle, and the generated token will beOPENAI_API(to be used later).
- Note: Each API has a free quota and restrictions. For details, please refer to OpenAI Pricing.
- Retrieve the Line Token:
- Login to Line Developer.
- Create a bot:
- Create a
Provider-> clickCreate. - Create a
Channel-> selectCreate a Messaging API channel. - Enter the required basic information.
- After completion, there is a
Channel SecretunderBasic Settings-> clickIssue, and the generated token will beLINE_CHANNEL_SECRET(to be used later). - Under
Messaging API, there is aChannel access token-> clickIssue, and the generated token will beLINE_CHANNEL_ACCESS_TOKEN(to be used later).
- Create a
- Fork the Github project:
- Register/login to GitHub.
- Go to ChatGPT-Line-Bot.
- Click
Starto support the developer. - Click
Forkto copy all the code to your own repository.
- Deploy (free space):
- Go to replit.
- Click
Sign Upand log in with yourGithubaccount and authorize it -> clickSkipto skip the initialization settings. - On the main page in the middle, click
Create-> a pop-up window will appear, clickImport from Githubon the upper right corner. - If you have not added the Github repository, click the link
Connect GitHub to import your private repos.-> checkOnly select repositories-> selectChatGPT-Line-Bot. - Go back to step 4. At this point, the
Github URLcan select theChatGPT-Line-Botproject -> clickImport from Github.
- Environment variables setting:
- After completing the previous step of
Import, click onToolsat the bottom left of the project management page inReplit, then click onSecrets. - Click on
Got iton the right side to add environment variables, which includes:- Desired model:
- key:
OPENAI_MODEL_ENGINE - value:
gpt-3.5-turbo
- key:
- 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).
- key:
SYSTEM_MESSAGE - value:
You are a helpful assistant.
- key:
- Line Channel Secret:
- key:
LINE_CHANNEL_SECRET - value:
[obtained from step one]
- key:
- Line Channel Access Token:
- key:
LINE_CHANNEL_ACCESS_TOKEN - value:
[obtained from step one]
- key:
- Desired model:
- After completing the previous step of
- Start running:
- Click on
Runon the top. - After successful, the right-side screen will display
Hello World, and the URL on the top of the screen should be copied down. - Go back to Line Developer, paste the URL above
Webhook URLunderMessaging API, and add/callbackto the end, for example:https://ChatGPT-Line-Bot.explainthis.repl.co/callback - Turn on
Use webhookbelow. - Turn off
Auto-reply messagesbelow.
- Note: if there is no request within an hour, the program will be interrupted, so the following steps are needed.
- Click on
- CronJob scheduled request sending:
- Register/Login to cron-job.org
- In the upper right corner of the panel, select
CREATE CRONJOB - Enter
ChatGPT-Line-Botin the Title field, and enter the URL from the previous step, for example:https://ChatGPT-Line-Bot.explainthis.repl.co/ - Send a request every
5 minutesbelow - Click on
CREATE
To start a conversation with ChatGPT, simply type your message in the text input box. Other available commands include:
| Command | Description |
|---|---|
/註冊 |
Enter /註冊 + OpenAI API Token in the input box to register your token |
/系統訊息 |
Enter /系統訊息 + the role you want ChatGPT to play in the input box |
/清除 |
Enter /清除 in the input box to clear the chat history |
/圖像 |
Enter /圖像 + command in the input box to call the DALL·E 2 model and generate an image |
| Voice input | Use voice input, the system will automatically translate the voice into text, and ChatGPT will respond in text |
| Text input | Directly input text to enter the normal ChatGPT conversation mode |
Like this free project? Please consider supporting us to keep it running.

