I am calling FollowupAction in my first Action(get called at initpayload). FollowupAction is not working, its neither giving any error, nor getting executed. Added Followup action in domain.yml too, but no help, even if i remove, there is no error observed. RASA : v2.8 Can any one help me on what i might be doing wrong.
ACTIONS:
from rasa_sdk.events import FollowupAction
class ActionSessionStart(Action):
def name(self) -> Text:
return "action_session_start"
def run(
self,
dispatcher: CollectingDispatcher,
tracker,
domain: Dict[Text, Any],) :
"""This run function will be executed when "action_session_start" is triggered."""
dispatcher.utter_message("Hellooo! Genie welcomes you")
print("action_session_start")
return [FollowupAction('action_load_embeddings')]
class ActionLoadEmbeddings(Action):
""" Loads embeddings after session starts"""
def __init__(self):
ActionLoadEmbeddings.em = None
def name(self) -> Text:
return 'action_load_embeddings'
def run(self, dispatcher, tracker, domain):
print(" In ActionLoadEmbeddings")
em = embedding_model_DnA()
em.load_embeddings()
ActionLoadEmbeddings.em = em
return []
OUTPUT:
2021-12-12 23:27:47 INFO rasa_sdk.endpoint - Starting action endpoint server...
2021-12-12 23:27:55 INFO rasa_sdk.executor - Registered function for 'action_faq'.
2021-12-12 23:27:55 INFO rasa_sdk.executor - Registered function for 'action_fetch_button_value'.
2021-12-12 23:27:55 INFO rasa_sdk.executor - Registered function for 'action_open_link'.
2021-12-12 23:27:55 INFO rasa_sdk.executor - Registered function for 'action_session_start'.
2021-12-12 23:27:55 INFO rasa_sdk.executor - Registered function for 'action_load_embeddings'.
2021-12-12 23:27:55 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://0.0.0.0:5055
action_session_start
test input ---- > > > machine learning
Expected" Before test input, " In ActionLoadEmbeddings" must be printed