There are some great books and courses available on the Chat bot
Avdi Grimm
Let's Make a Chatbot in Ruby!