I need a AI for chatbot

I’m looking for guidance and tips on developing a chatbot for Telegram and WhatsApp platforms. My intention is to create a virtual assistant capable of interacting with users and also generating python codes automatically, according to their requests. I need free ai recommendations since gpt2 is giving me errors, for me to implement in my chatbot.