Some context
I’ll keep this short because most people won't get it. In Romania, there used to be a very popular politician called Vadim Tudor. Now, this guy is more than just a character, but what most people know him for is his raging outbursts on TV.
So I was at a friend’s house, and we watched some videos of this guy and had the amazing idea of telling an AI agent to pretend to be this guy and reply as if it were the real Vadim Tudor.
I remember that some time ago we used to have a bot in our Telegram group that just posted random funny quotes from this guy. So I did the only sensible thing somebody would do in this scenario.
The sensible thing to do
I decided to take it a step further and replace the quotes list we had in our “Vadim Bot” with an AI agent that would listen to the discussion in the group and make random comments that this politician would make. It was basically this bot insulting and making hilarious nationalistic comments about what we were talking about.
I chose to create a client application that would pool the chat rather than having a server to avoid needing a reverse proxy, this way the simple client application would just gather the last couple of messages once in a while and send them to an AI agent along with a system prompt with instructions on impersonating this political figure, and it worked like magic.
I refined it a little bit, changed the hard-coded strings, and made it so people can just get their Telegram and Groq credentials and use this on any Telegram chat they wish to, provide it with their own system prompt, and go to town.
The scope
We used it for entertainment, but since you have access to the system prompt, you can give it whatever role you would like, maybe making a private chat with the bot, and it's pretty much your AI agent inside Telegram.
Thank you for reading through, and I hope you have some fun with this project! GitHub Link