One Class many actions

Can I create one Class and have multiple actions within a form?

For example:

class askquestion(Action):
  def name(self):
      return "action_ask_question" + n
  def run():
      ....
      return []

By this I can ask ‘n’ number of questions and dynamically change it overtime? If possible, how to set slots dynamically in domain file.

Forms are designed to do this and you can use dynamic form behavior to change the questions.

Hi @stephens, thanks for responding. I understand the dynamic form behavior of RASA. But my usecase is different. The questions that needs to be asked itself could change drastically, i.e., number of slots, entites, etc will also change. For this I will have to write new FormValidation. Instead of this effort, are there any ways where I can connect the RASA to a question bank?

The questions or number of questions in this question bank can vary frequently.

You could take a look at the blog post Integrating Rasa with knowledge bases and knowledge based actions.