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
Feat: Add the config of debounce second, to control the edit rate (#28)
* Feat: Add the config of debounce second, to control the edit rate
- Addtionally, add the config manifest into the README.md, and improve
this file for better readability
Co-authored-by: Miguel Piedrafita <github@miguelpiedrafita.com>
Copy file name to clipboardexpand all lines: README.md
+11-6
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,22 @@
5
5
Go CLI to fuels a Telegram bot that lets you interact with [ChatGPT](https://openai.com/blog/chatgpt/), a large language model trained by OpenAI.
6
6
7
7
## Installation
8
-
9
-
Download the file corresponding to your OS in the [releases page](https://github.com/m1guelpf/chatgpt-telegram/releases/latest):
10
-
8
+
Download the file corresponding to your OS in the [releases page](https://github.com/m1guelpf/chatgpt-telegram/releases/latest).
11
9
-`chatgpt-telegram-Darwin-amd64`: macOS (Intel)
12
10
-`chatgpt-telegram-Darwin-arm64`: macOS (M1)
13
11
-`chatgpt-telegram-Linux-amd64`: Linux
14
12
-`chatgpt-telegram-Linux-arm64`: Linux (ARM)
15
13
-`chatgpt-telegram-Win-amd64`: Windows
16
14
17
-
After you download the file, extract it into a folder and open the `env.example` file with a text editor and fill in your credentials. You'll need your bot token, which you can find [here](https://core.telegram.org/bots/tutorial#obtain-your-bot-token), and optionally your telegram id, which you can find by DMing `@userinfobot` on Telegram. Save the file, and rename it to `.env`.
18
-
15
+
After you download the file, extract it into a folder and open the `env.example` file with a text editor and fill in your credentials.
16
+
-`TELEGRAM_TOKEN`: Your Telegram Bot token
17
+
- Follow [this guide](https://core.telegram.org/bots/tutorial#obtain-your-bot-token) to create a bot and get the token.
18
+
-`TELEGRAM_ID` (Optional): Your Telegram User ID
19
+
- If you set this, only you will be able to interact with the bot.
20
+
- To get your ID, message `@userinfobot` on Telegram.
21
+
-`EDIT_WAIT_SECONDS` (Optional): Amount of seconds to wait between edits
22
+
- This is set to `1` by default, but you can increase if you start getting a lot of `Too Many Requests` errors.
23
+
- Save the file, and rename it to `.env`.
19
24
> **Note** Make sure you rename the file to _exactly_`.env`! The program won't work otherwise.
20
25
21
26
Finally, open the terminal in your computer (if you're on windows, look for `PowerShell`), navigate to the path you extracted the above file (you can use `cd dirname` to navigate to a directory, ask ChatGPT if you need more assistance 😉) and run `./chatgpt-telegram`.
@@ -24,7 +29,7 @@ Finally, open the terminal in your computer (if you're on windows, look for `Pow
24
29
25
30
By default, the program will launch a browser for you to sign into your account, and close it once you're signed in. If this setup doesn't work for you (there are issues with the browser starting, you want to run this in a computer with no screen, etc.), you can manually extract your session from your browser instead.
26
31
27
-
To do this, first sign into ChatGPT on your browser, then open the Developer Tools (right click anywhere in the page, then click "Inspect"), click on the Application tab and then on the Cookies section, and copy the value of the `__Secure-next-auth.session-token` cookie.
32
+
To do this, first sign in to ChatGPT on your browser, then open the Developer Tools (right click anywhere in the page, then click "Inspect"), click on the Application tab and then on the Cookies section, and copy the value of the `__Secure-next-auth.session-token` cookie.
28
33
29
34
You will then have to create a config file in the following location depending on your OS (replace `YOUR_USERNAME_HERE` with your username:
0 commit comments