NameError: name 'FormAction' is not defined when running

Hi, I’m trying to implement a form action, so my looks like this:

from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher

class BeratungForm(FormAction):

   def name(self) -> Text:
       return "beratung_form"

   [followed by some functions]

But when I try to run the in my terminal with

rasa run actions

I get a long stacktrace with the error

File "/home/sugarshock/bildungsbot-ai/", line 29, in <module>
      class BeratungForm(FormAction):
NameError: name 'FormAction' is not defined

at the bottom. I couldn’t find any more recent information on how to implement the form action other than this tutorial.

Does anybody have an idea what’S the problem?

1 Like

Hi @sugarshock

You forget to include from rasa_sdk.forms import FormAction in your

1 Like