LLM-based conversational Telegram bot aiming to mimic human texting behaviour
demo.mp4
- Faux typing indicator and delays between messages
- Conversational memory using summarisation models (using a technique similar to this)
- A separate bot to manage the bot's "context" (instructions on writing responses) from within Telegram (
/set_context,/get_context) - Manage conversation history using commands from within Telegram (
/update_history,/clear_history)
- Python 3 (tested on 3.9)
- A separate Telegram user account from your own, i.e. a second phone number to register for one (or use a service like Textverified)
- A NLP Cloud account (they provide free initial credits)
- Clone repo, install dependencies in
requirements.txt - Rename
template.envto.env - Create a Telegram user account and obtain its API ID and hash
- Create a Telegram bot (message @BotFather) and obtain its bot token
- Create a NLP Cloud account and get your API key
- Get your personal Telegram account's user ID (not that of the bot you created earlier) (message @userinfobot)
- Update
.envwith all above information - Run
main.py