You could look at this sample in the marketplace. There are other alternatives as well (google/aws/etc), so depending on your requirements, I would advise you to browse for 'chat bot' or the required technology in the market place and make use of the samples to understand what is required.
Hey Priya,
There is a lot of documentation around building your own AI chatbot, you can have a look at: