Unofficial Telegram bot for ChatGPT and Bard
- Intergratin with Bard
- Intergration with ChatGPT
- Parse awesome-chatgpt-prompts on the fly.
- Python>=3.10 Installed
- Telegram Bot token
Clone and install dependencies
git clone https://github.com/Simatwa/telegram-bots
cd telegram-chatbots
pip install -r requirements.txt
It is presumed that you're in possession of Telegram Bot Token, if that's not the case then have one from @BotFather.
Since this script depends on GoogleBard and WebChatGPT libraries, purpose to walkthrough their documentations then use that knowledge to find the required information stated in the env file.
They include :
Variable | Info |
---|---|
bard | Google's bard session key |
openai_cookie_file | Path to openai-cookie-file.json |
After filling the env file, rename it to .env
and vallah! You're just one step away.
Since this is a personal bot, you have to uniquely identify yourself with the bot, so you'll be required to hunt down your user id.
So fire up the bot, python user_id.py
and then on the chat panel, send this command myId
inorder for the bot to echo back your Telegram's User ID. Add the id to the .env
file as users_id=<user-id>
. If you would like multiple users to access the bot, add their IDs as well separated by commas. i.e users_id=11223344,55667788
.
Simply run python main.py
and have some fun.
The code in this repository is an unofficial implementation and integration of OpenAI's ChatGPT and Bard models. It is not endorsed or supported by either partys. In addition, this code might not reflect the latest practices or updates from them. It is provided as-is, and there are no guarantees regarding its performance, reliability, or security. Use it at Your Own Risk. The developer of this repository disclaim any liability for the usage or consequences of utilizing these scripts.