Free ChatGPT Telegram Bot with Multiple Providers support!
No APi-Key | Pre-Defiened Roles | Inline mode | Dan Mode v10
[Last Status: Jun 17, 2024]: Fixed (FileNotFountError) in providers.json for old users!
See more logs here
- Smart reply: Reply to user's message to process them with GPT.
- Code generator: Use code generator to generate functions in many languages.
- Image generator: Use AI to generate images from prompt.
- similar question: Generate similar questions beside Re-Generate button
- Multi voice TTS: Add multiple TTS voices in multiple langugaes
Voice response: Use Brian voice as your respone(DONE)Multiple models: Use multiple providers(DONE)- Multiple language: Bot supports multiple languages for better communication. (Idea by chelaxian | Issue)
From now bot includes multiple providers (Thanks for gpt4free).
For responding, bot tries all providers one by one to respond and breaks the loop in first valid response. So you don't have to select provider.
If non of providers worked, bot will tell you to generate your prompt again.
List of available providers:
- FakeOpen Ai (uses model ChatGPT 3.5 Turbo)
- Fstha Chat (uses model ChatGPT 3.5 Turbo)
- DeepInfra AI (uses model Llama 2 70b Chat hf)
- Online GPT (uses model ChatGPT 3.5 Turbo)
- Free GPT 4 (uses ChatGPT 4)
- GPT 4 Free (uses ChatGPT 4) gpt4free
- Uncensored AI: (uses Llama 3 70b)
You can send
/settings
command to bot to change these providers (Enable/Disable)
Since bot is supporting multiple providers now, you can use /ping
to check which one is working.
I welcome contributions. If you've found a reliable solution to this issue or have other useful suggestions, please consider contributing to this project.
This bot responds to every message with ChatGPT AI and other models like llama, excluding commands.
- Inline mode for obtaining predefined roles. How to use
- The ability to remember chat history.
- Multiple providers.
- Voice response.
- Provider settings (use /settings)
To get started, first you need to clone this repository from github into your machine:
git clone https://github.com/Kourva/AwesomeChatGPTBot
if you dont have git or python you can install it from your package manager!
Then you have to install requirements before running bot
- Navigate to bot directory
- Install requirements using pip
cd AwesomeChatGPTBot
pip install -r requirements.txt
This will install pyTelegamBotAPI and Requests for you, You can also install them manually if you got any error:
pip install pyTelegamBotAPI Requests
Now you have to create bot from BotFather (If you don't have) and get your Token to start working with your bot.
After getting Token from BotFather replace the Token in token.txt
0000000000:AAE7fbH29UPOKzlHlp0YDr9o06o_NdD4DBk
You can use editors like 'nano' or 'vim' in Termux or using echo command to write token to file:
echo "0000000000:AAE7fbH29UPOKzlHlp0YDr9o06o_NdD4DBk" > token.txt
This is just an example Token.
you can set your bot's commands manually or using 'init.py' script
python init.py
This will set up these commands in bot's menu
/start
/help
/ping
/chat
/features
/history
/reset
/danmode
/tts
/settings
Now you are ready to launch your bot in polling mode inside your terminal using python
python main.py
You can also use proxychains to run your bot via Tor proxy
proxycahins python main.py
Or in quiet mode
proxychains -q python main.py
To install proxychains install proxychains-ng
and then edit the config file in /etc/proxychains.conf
.
It depends on you to use strict_chain
or dynamic_chain
. Config it by yourself.
If you got any denied requests that blocked your Ip address, you can renew your IP
sudo killall -HUP tor
And if you want to check your TOR status, use this command:
proxychains curl https://check.torproject.org/api/ip
Don't forget to enable Inline Mode in your bot.
See documentation here: https://core.telegram.org/bots/api#inline-mode
If you have any suggestions or feedback, feel free to share. I appreciate your interest and contribution to the project!
[Jun 17, 2024] Fixed (FileNotFountError) in providers.json for old users!
[Jun 05, 2024] Added Uncensored AI!
[Apr 21, 2024] Added gpt4free client which have no issues operating with Cyrillic/Chinese symbols
[Mar 14, 2024] Added /settings & /tts commands
[Mar 14, 2024] Added voice response
/tts hi
[Mar 14, 2024] Added new chatGPT 4 provider
[Dec 22, 2023] Added Multiple Providers.
[Dec 22, 2023] Added /ping
command to ping providers.
[Dec 22, 2023] Removed /setting
command and setting files for users.
[Dec 22, 2023] Added more exception handlers for both Connection and Telegram API.
[Dec 01, 2023] Smarter Re-generate: Uses smarter way to re-generate replied question.
[Dec 01, 2023] Settings command: Added setting command to change bot response setting.
[Dec 01, 2023] Added titles.py: To make main code more clear.
[Dec 01, 2023] Error handling: Added more handlers and depp link handlers.
[Nov 13, 2023] PEP8 fixes: Fixed some PEP8 issues.
[Nov 13, 2023] Extra commands: Added help
, features
and chat
commands.
[Nov 13, 2023] MarkdownV2: Added converter to convert regular markdown to Markdown V2.
[Nov 13, 2023] History management: Added utilities to check history and fix it when it got broken.
[Nov 13, 2023] Re-Generate: Users can re-generate their prompts, new answer will be raplaced with old one
[Nov 13, 2023] Improved chat handler: Users now requied to use /chat in groups to chat with bot.
/chat hi
This will avoid mess in replies and even reactions to bot's responses.
[Nov 01, 2023] History command: Added history section added (use /history to get history file)
[Nov 01, 2023] History reset: Added /reset command to reset the chat history.
[Nov 01, 2023] Dan mode v10: Added /danmode** command to enable/disable DAN mode v10.0 in bot.
Note: History will reset when using /danmode command!!