How to make generative-based chatbot using Rasa?

In Custom Actions you can write any Python code, so the specific code is unrelated to Rasa.

The basic structure is as in the link I previously shared: You write the Python code inside the run() method.

You use tracker.latest_message['text'] to get the text of that message and look it up on Wikipedia or whatever you want to do with it.

Stories and written like for regular responses, but instead of starting with utter_, custom action names should start with action_.

Please read everything under the “Rasa Action Server” category and everything under the “Actions” section in the “Rasa Open Source” category.