Skip to content

Commit 9b40fa8

Browse files
authored
Merge pull request #24 from F33RNI/next
Next
2 parents e578cc8 + 47c3f34 commit 9b40fa8

File tree

8 files changed

+58
-50
lines changed

8 files changed

+58
-50
lines changed

Diff for: BotHandler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ async def bot_command_or_message_request(self, request_type: int,
605605
if self.config["telegram"]["show_queue_message"]:
606606
await _send_safe(user["user_id"],
607607
self.messages["queue_accepted"].format(
608-
RequestResponseContainer.REQUEST_NAMES[request_type],
608+
self.messages["modules"][request_type],
609609
len(self.queue_handler.get_queue_list()),
610610
self.config["telegram"]["queue_max"]), context)
611611

Diff for: README.md

+38-33
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GPT-Telegramus
1+
# 🤖 GPT-Telegramus
22
## ChatGPT, EdgeGPT, DALL-E and Bard implementation as a telegram bot with admin control and automatic proxy searcher
33
<div style="width:100%;text-align:center;">
44
<p align="center">
@@ -17,6 +17,10 @@
1717
<p align="center">
1818
<img src="Screenshots/help.png" width="auto" height="300" alt="/help command">
1919
<img src="Screenshots/chatgpt.png" width="auto" height="300" alt="Screenshot of request to ChatGPT">
20+
</p>
21+
</div>
22+
<div style="width:100%;text-align:center;">
23+
<p align="center">
2024
<img src="Screenshots/edgegpt.png" width="auto" height="300" alt="Screenshot of request to EdgeGPT">
2125
<img src="Screenshots/dalle.png" width="auto" height="300" alt="Screenshot of request to DALL-E">
2226
<img src="Screenshots/bard.png" width="auto" height="300" alt="Screenshot of request to Bard">
@@ -25,16 +29,16 @@
2529

2630
----------
2731

28-
## Support project
32+
## 😋 Support project
2933

3034
Support the project by buying and listening to my music 🎵
3135

32-
- [Bandcamp](https://f3rni.bandcamp.com)
33-
- [SoundCloud](https://soundcloud.com/f3rni)
36+
- 🟦 [Bandcamp](https://f3rni.bandcamp.com)
37+
- 🟧 [SoundCloud](https://soundcloud.com/f3rni)
3438

3539
----------
3640

37-
## Dependencies
41+
## 📙 Dependencies
3842

3943
- **ChatGPT** (ChatGPT by OpenAI): https://chat.openai.com/chat
4044
- **EdgeGPT** (EdgeGPT by Microsoft): https://bing.com/chat
@@ -47,7 +51,7 @@ Support the project by buying and listening to my music 🎵
4751

4852
----------
4953

50-
## Get started
54+
## Get started
5155

5256
1. Install Python and pip
5357
2. Download source code
@@ -60,15 +64,15 @@ Support the project by buying and listening to my music 🎵
6064

6165
----------
6266

63-
## Bot messages
67+
## 💬 Bot messages
6468

6569
You can edit telegram bot messages by editing file `messages.json`. You can add new lines by adding `\\n`
6670

6771
Note: make sure you don't delete argumensts `{0}`, `{1}`, ... in message and please restart script to apply changes
6872

6973
----------
7074

71-
## Running as service on linux
75+
## 🐧 Running as service on linux
7276

7377
1. Install Python and pip
7478
2. Clone repo
@@ -97,7 +101,7 @@ Note: make sure you don't delete argumensts `{0}`, `{1}`, ... in message and ple
97101

98102
----------
99103

100-
## Running in Docker
104+
## 🐋 Running in Docker
101105

102106
**WARNING: not tested**
103107

@@ -119,7 +123,7 @@ docker run -d -e TELEGRAMUS_SETTINGS_FILE="PATH_TO_config.json" --name gpt-teleg
119123

120124
----------
121125

122-
## Proxy to bypass geo-blocking
126+
## 🌎 Proxy to bypass geo-blocking
123127

124128
It is possible to bypass geo-blocking of ChatGPT, EdgeGPT, DALL-E or Bard. GPT-Telegramus includes automatic proxy-list downloading with periodic checks
125129

@@ -132,44 +136,45 @@ Sometimes, searching for a proxy can take a long time. If you think that the fou
132136

133137
----------
134138

135-
## Telegram bot commands
136-
137-
- `/start` - Welcome message and bot version
138-
- `/help` - Show this message
139-
- `/chatgpt <request>` - ChatGPT request
140-
- `/edgegpt <request>` - EdgeGPT request
141-
- `/bard <request>` - Bard request
142-
- `/dalle <request>` - Draw a picture with DALL-E
143-
- `/clear <module>` - Clear chat history (chatgpt / edgegpt / bard)
144-
- `/chatid` - Show your chat_id
145-
Or just send a text message
146-
147-
Admin commands:
148-
- `/queue` - Show requests queue
149-
- `/restart` - Restart modules and telegram bot
150-
- `/users` - Show list of all users
151-
- `/ban <id> [reason]` - Ban a user by their id with reason (optional)
152-
- `/unban <id>` - Unban a user by their id
153-
- `/broadcast <message>` - Send text message to everyone except banned users
139+
## 🤖 Telegram bot commands
140+
141+
- 📄 `/start` - Welcome message and bot version
142+
- 📙 `/help` - Show this message
143+
- 🤖 `/chatgpt <request>` - ChatGPT request
144+
- 🔵 `/edgegpt <request>` - EdgeGPT request
145+
- 🖥 `/bard <request>` - Bard request
146+
- 🖼 `/dalle <request>` - Draw a picture with DALL-E
147+
- 🧹 `/clear <module>` - Clear chat history (chatgpt / edgegpt / bard)
148+
- 🆔 `/chatid` - Show your chat_id
149+
150+
💬 Or just send a text message to make a request
151+
152+
### Admin commands:
153+
- 💬 `/queue` - Show requests queue
154+
- 🔃 `/restart` - Restart modules and telegram bot
155+
- 👤 `/users` - Show list of all users
156+
- 🔨 `/ban <id> [reason]` - Ban a user by their id with reason (optional)
157+
- 🔓 `/unban <id>` - Unban a user by their id
158+
- 📢 `/broadcast <message>` - Send text message to everyone except banned users
154159

155160
----------
156161

157-
## Chat history
162+
## 📄 Chat history
158163

159164
GPT-Telegramus saves only ChatGPT chat history locally (`"conversations_dir": "conversations"`). Other modules either have a built-in ability to save chat history or do not have the ability to split conversations
160165

161166
----------
162167

163-
## TODO
168+
## 📝 TODO
164169

165170
- Add some free GPT-4 model
166171

167172
----------
168173

169-
## Contribution
174+
## Contribution
170175

171176
- Anyone can contribute! Just create a pull request
172177

173178
----------
174179

175-
## P.S. This project is still under development!
180+
### 🚧 P.S. This project is still under development!

Diff for: Screenshots/bard.png

12.8 KB
Loading

Diff for: Screenshots/chatgpt.png

-14.7 KB
Loading

Diff for: Screenshots/dalle.png

77.6 KB
Loading

Diff for: Screenshots/edgegpt.png

12.1 KB
Loading

Diff for: Screenshots/help.png

-4.91 KB
Loading

Diff for: messages.json

+19-16
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
{
2-
"start_message": "Hello, choomba!\\n\\nGPT-Telegramus version {0}\\n\\nGPT-Telegramus author: Fern Lane\\nContributors: Sergey Krashevich\\nChatGPT API: acheong08\\nEdgeGPT API: acheong08\\nBard API: acheong08\\n\\nSupport the project by buying my music: https://f3rni.bandcamp.com",
3-
"help_message": "/start - Welcome message and bot version\\n/help - Show this message\\n/chatgpt <request> - ChatGPT request\\n/edgegpt <request> - EdgeGPT request\\n/bard <request> - Bard request\\n/dalle <request> - Draw a picture with DALL-E\\n/clear <module> - Clear chat history (chatgpt / edgegpt / bard)\\n/chatid - Show your chat_id\\n\\nOr just send a text message",
4-
"help_message_admin": "Admin commands:\\n/queue - Show requests queue\\n/restart - Restart modules and telegram bot\\n/users - Show list of all users\\n/ban <id> [reason] - Ban a user by their id with reason (optional)\\n/unban <id> - Unban a user by their id\\n/broadcast <message> - Send text message to everyone except banned users",
5-
"empty_request": "Empty request, choomba!",
6-
"permissions_deny": "You do not have permission for this command!",
7-
"queue_overflow": "Queue is full. Try again later",
8-
"queue_empty": "Queue is empty",
9-
"queue_accepted": "Request to the {0} module\\nAdded to the queue. Position: {1}/{2}",
10-
"response_error": "Error: {0}\\n\\nMake another request or try again later =(",
11-
"edgegpt_sources": "[{0}] {1} ({2})\\n",
2+
"start_message": "Hello, \uD83D\uDC4B choomba! \uD83D\uDC4B\\n\\nGPT-Telegramus version \uD83D\uDCC4 {0}\\n\\nGPT-Telegramus author: Fern Lane\\nContributors: Sergey Krashevich\\nChatGPT API: acheong08\\nEdgeGPT API: acheong08\\nBard API: acheong08\\n\\nSupport the project by buying my music: https://f3rni.bandcamp.com",
3+
"help_message": "\uD83D\uDCC4 /start - Welcome message and bot version\\n/help - Show this message\\n\uD83E\uDD16 /chatgpt <request> - ChatGPT request\\n\uD83D\uDD35 /edgegpt <request> - EdgeGPT request\\n\uD83D\uDDA5 /bard <request> - Bard request\\n\uD83D\uDDBC /dalle <request> - Draw a picture with DALL-E\\n\uD83E\uDDF9 /clear <module> - Clear chat history (chatgpt / edgegpt / bard)\\n\uD83C\uDD94 /chatid - Show your chat_id\\n\\n\uD83D\uDCAC Or just send a text message",
4+
"help_message_admin": "Admin commands:\\n\\n\uD83D\uDCAC /queue - Show requests queue\\n\uD83D\uDD03 /restart - Restart modules and telegram bot\\n\uD83D\uDC64 /users - Show list of all users\\n\uD83D\uDD28 /ban <id> [reason] - Ban a user by their id with reason (optional)\\n\uD83D\uDD13 /unban <id> - Unban a user by their id\\n\uD83D\uDCE2 /broadcast <message> - Send text message to everyone except banned users",
5+
"empty_request": "Empty request, \uD83E\uDD74 choomba!",
6+
"permissions_deny": "You do not have permission for this command! \uD83D\uDD28",
7+
"queue_overflow": "Queue is full. Try again later",
8+
"queue_empty": "Queue is empty \uD83D\uDDD1",
9+
"queue_accepted": "Request to the {0} module\\nAdded to the queue. Position: {1}/{2}",
10+
"response_error": "Error: {0}\\n\\nMake another request or try again later \uD83D\uDE2D",
11+
"edgegpt_sources": "\uD83D\uDCC4 [{0}] {1} ({2})\\n",
1212
"users_admin": "User ID (Name)\\tAdmin?\\tBanned?\\tTotal requests\\n\\n{0}",
13-
"restarting": "Restarting in progress...\\nPlease wait",
14-
"restarting_done": "The restart is completed",
13+
"restarting": "Restarting in progress...\\nPlease wait \uD83D\uDE4F",
14+
"restarting_done": "The restart is completed \uD83C\uDF89",
1515
"chat_cleared": "Chat history cleared for module: {0}",
1616
"clear_no_module": "Specify the module whose chat history you want to clear\\nchatgpt / edgegpt / bard\\nExample: /clear chatgpt",
1717
"ban_message_admin": "Banned user: {0}\\n\\nReason: {1}",
1818
"ban_no_user_id": "Error! Please specify user_id",
19-
"ban_message_user": "You have been banned!\\n\\nReason: {0}",
20-
"ban_reason_default": "Reason not specified. Maybe the whitelist is enabled or you pissed off the admin =)",
19+
"ban_message_user": "You have been banned! \uD83D\uDD28\\n\\nReason: {0}",
20+
"ban_reason_default": "Reason not specified. Maybe the whitelist is enabled or you pissed off the admin \uD83D\uDE02",
2121
"unban_message_admin": "Unbanned user: {0}",
2222
"broadcast_no_message": "No message to broadcast!",
23-
"broadcast": "[GPT-TELEGRAMUS]\\n\\n{0}"
24-
}
23+
"broadcast": "\uD83D\uDCE2 GPT-TELEGRAMUS \uD83D\uDCE2\\n\\n{0}",
24+
"modules": [
25+
"\uD83E\uDD16 ChatGPT", "\uD83D\uDDBC DALL-E", "\uD83D\uDD35 EdgeGPT", "\uD83D\uDDA5 Bard"
26+
]
27+
}

0 commit comments

Comments
 (0)