You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
8
+
Do you want to integrate ChatGPT into various chat platforms? This repository teaches you how to integrate it with Tinder so that you can automatically reply to messages and make new friends even when you're busy. The provided code structure only infers from past chat records, but engineers who can write code can also use users' background information, or even use image-related models to detect pictures, to enable ChatGPT to respond more appropriately.
@@ -16,27 +16,23 @@ Import the ChatGPT bot to Line and start interacting with it by simply typing te
16
16
2. Click on the avatar on the top right corner and select `View API keys`.
17
17
3. Click on `Create new secret key` in the middle, and the generated token will be `OPENAI_API` (to be used later).
18
18
- Note: Each API has a free quota and restrictions. For details, please refer to [OpenAI Pricing](https://openai.com/api/pricing/).
19
-
2. Retrieve the Line Token:
20
-
1. Login to [Line Developer](https://developers.line.biz/zh-hant/).
21
-
2. Create a bot:
22
-
1. Create a `Provider` -> click `Create`.
23
-
2. Create a `Channel` -> select `Create a Messaging API channel`.
24
-
3. Enter the required basic information.
25
-
4. After completion, there is a `Channel Secret` under `Basic Settings` -> click `Issue`, and the generated token will be `LINE_CHANNEL_SECRET` (to be used later).
26
-
5. Under `Messaging API`, there is a `Channel access token` -> click `Issue`, and the generated token will be `LINE_CHANNEL_ACCESS_TOKEN` (to be used later).
19
+
2. Obtain the Tinder Token:
20
+
1. Log in to [Tinder](https://tinder.com/).
21
+
2. Right-click -> `Inspect` -> `Network` -> Select any Request -> Look for `x-auth-token` in the Request.
22
+
27
23
28
24
### Project Setup
29
25
1. Fork the Github project:
30
26
1. Register/login to [GitHub](https://github.com/).
31
-
2. Go to [ChatGPT-Line-Bot](https://github.com/TheExplainthis/ChatGPT-Line-Bot).
27
+
2. Go to [ChatGPT-Tinder-Bot](https://github.com/TheExplainthis/ChatGPT-Tinder-Bot).
32
28
3. Click `Star` to support the developer.
33
29
4. Click `Fork` to copy all the code to your own repository.
34
30
2. Deploy (free space):
35
31
1. Go to [replit](https://replit.com/).
36
32
2. Click `Sign Up` and log in with your `Github` account and authorize it -> click `Skip` to skip the initialization settings.
37
33
3. On the main page in the middle, click `Create` -> a pop-up window will appear, click `Import from Github` on the upper right corner.
38
-
4. If you have not added the Github repository, click the link `Connect GitHub to import your private repos.` -> check `Only select repositories` -> select `ChatGPT-Line-Bot`.
39
-
5. Go back to step 4. At this point, the `Github URL` can select the `ChatGPT-Line-Bot` project -> click `Import from Github`.
34
+
4. If you have not added the Github repository, click the link `Connect GitHub to import your private repos.` -> check `Only select repositories` -> select `ChatGPT-Tinder-Bot`.
35
+
5. Go back to step 4. At this point, the `Github URL` can select the `ChatGPT-Tinder-Bot` project -> click `Import from Github`.
40
36
41
37
### Project Execution
42
38
1. Environment variables setting:
@@ -51,36 +47,34 @@ Import the ChatGPT bot to Line and start interacting with it by simply typing te
51
47
3. ChatGPT text limit:
52
48
- key: `OPENAI_MAX_TOKENS`
53
49
- value: `128`
54
-
4. Line Channel Secret:
55
-
- key: `LINE_CHANNEL_SECRET`
56
-
- value: `[obtained from step one]`
57
-
5. Line Channel Access Token:
58
-
- key: `LINE_CHANNEL_ACCESS_TOKEN`
50
+
4. Tinder Token:
51
+
- key: `TINDER_TOKEN`
59
52
- value: `[obtained from step one]`
60
53
2. Start running:
61
54
1. Click on `Run` on the top.
62
-
2. After successful, the right-side screen will display `Hello World`, and the **URL** on the top of the screen should be copied down.
63
-
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`
64
-
4. Turn on `Use webhook` below.
65
-
5. Turn off `Auto-reply messages` below.
55
+
2. After successful, the right-side screen will display `{"message": "Hello World"}`, and the **URL** on the top of the screen should be copied down.
66
56
- Note: if there is no request within an hour, the program will be interrupted, so the following steps are needed.
67
57
3. CronJob scheduled request sending:
68
58
1. Register/Login to [cron-job.org](https://cron-job.org/en/)
69
59
2. In the upper right corner of the panel, select `CREATE CRONJOB`
70
-
3. Enter `ChatGPT-Discord-Bot` in the Title field, and enter the URL from the previous step, for example: `https://ChatGPT-Line-Bot.explainthis.repl.co/`
60
+
3. Enter `ChatGPT-Tinder-Bot` in the Title field, and enter the URL from the previous step, for example: `https://ChatGPT-Tinder-Bot.explainthis.repl.co/`
71
61
4. Send a request every `5 minutes` below
72
62
5. Click on `CREATE`
73
63
74
-
## Commands
75
-
To start a conversation with ChatGPT, simply type your message in the text input box. Other available commands include:
76
-
77
-
| Command | Description |
78
-
| ------- | ----------- |
79
-
|`/imagine`| Type `/imagine` followed by text in the input box to call the DALL·E 2 model and generate an image. |
64
+
## Explanation
65
+
- When does the bot reply?
66
+
- The bot scans every five minutes and skips if there is no reply from the other party. If there is still no reply after one day, the bot will leave another message.
67
+
- How can I customize the settings?
68
+
- In `main.py`, line 27 `scheduled_job` can be adjusted to change how often the bot replies.
69
+
- In `main.py`, line 34 `for` can be adjusted to change how many conversations the bot responds to.
70
+
- In `main.py`, line 47 `if` can be adjusted to change the conditions for when the bot responds to messages.
71
+
- How can I add more information?
72
+
- In `/src/dialog.py`, there is a prefix that can be used to add information such as your preferred response style, so the bot can respond in accordance with your style.
0 commit comments