Awesome
<p align="center"> <img align='center' src="https://github.com/Kourva/AwesomeChatGPTBot/assets/118578799/ef1cfefd-1e58-45d3-8a3a-fa9988a8322e" width=200 height=200/> <p align='center'><b>Free ChatGPT Telegram Bot with Multiple Providers support!</b></p> <p align='center'>No APi-Key | Pre-Defiened Roles | Inline mode | Dan Mode v10</p> </p> <br><br>▋Change Log
[Last Status: Jul 18, 2024]: Added Remix Project Ai!<br> See more logs here
<br>▋Upcoming Features
- 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)
Multiple Providers
From now bot includes multiple providers (Thanks for gpt4free).<br> 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.<br> 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)
▋Bot is Down? Not working?
Since bot is supporting multiple providers now, you can use /ping
to check which one is working.
Contributions
I welcome contributions. If you've found a reliable solution to this issue or have other useful suggestions, please consider contributing to this project.
<br>▋Features
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)
▋Clone Repository
To get started, first you need to clone this repository from github into your machine:
git clone https://github.com/Kourva/AwesomeChatGPTBot
<br>if you dont have git or python you can install it from your package manager!
▋Install Requirements
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
<br>
▋Configure your token
Now you have to create bot from BotFather (If you don't have) and get your Token to start working with your bot.<br>
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
<br>This is just an example Token.
▋Configure the bot commands (Optional)
you can set your bot's commands manually or using 'init.py' script
python init.py
<br>This will set up these commands in bot's menu
/start
/help
/ping
/chat
/features
/history
/reset
/danmode
/tts
/settings
▋Launch the bot
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
.<br>
It depends on you to use strict_chain
or dynamic_chain
. Config it by yourself.
<br>
▋TOR new IP address
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
<br>
▋Bot Inline Mode
Don't forget to enable Inline Mode in your bot.<br> See documentation here: https://core.telegram.org/bots/api#inline-mode
<br>▋Thanks a bunch for starring the project! :star:
If you have any suggestions or feedback, feel free to share. I appreciate your interest and contribution to the project!
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Kourva/AwesomeChatGPTBot&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Kourva/AwesomeChatGPTBot&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Kourva/AwesomeChatGPTBot&type=Date" /> </picture> <br>▋Full Change Log
[Jun 18, 2024] Added Remix Project Ai!<br> [Jun 17, 2024] Fixed (FileNotFountError) in providers.json for old users!<br> [Jun 05, 2024] Added Uncensored AI!<br> [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<br>
[Dec 22, 2023] Added Multiple Providers.<br>
[Dec 22, 2023] Added /ping
command to ping providers.<br>
[Dec 22, 2023] Removed /setting
command and setting files for users.<br>
[Dec 22, 2023] Added more exception handlers for both Connection and Telegram API.<br>
[Dec 01, 2023] Smarter Re-generate: Uses smarter way to re-generate replied question.<br>
[Dec 01, 2023] Settings command: Added setting command to change bot response setting.<br>
[Dec 01, 2023] Added titles.py: To make main code more clear.<br>
[Dec 01, 2023] Error handling: Added more handlers and depp link handlers.<br>
[Nov 13, 2023] PEP8 fixes: Fixed some PEP8 issues.<br>
[Nov 13, 2023] Extra commands: Added help
, features
and chat
commands.<br>
[Nov 13, 2023] MarkdownV2: Added converter to convert regular markdown to Markdown V2.<br>
[Nov 13, 2023] History management: Added utilities to check history and fix it when it got broken.<br>
[Nov 13, 2023] Re-Generate: Users can re-generate their prompts, new answer will be raplaced with old one<br>
[Nov 13, 2023] Improved chat handler: Users now requied to use /chat in groups to chat with bot.<bt>
/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)<br> [Nov 01, 2023] History reset: Added /reset command to reset the chat history.<br> [Nov 01, 2023] Dan mode v10: Added /danmode** command to enable/disable DAN mode v10.0 in bot.<br>
Note: History will reset when using /danmode command!!