Nyiko Maswanganyi
Nyiko Maswanganyi

Reputation: 49

only first dispatcher is returned in Rasa chatbot

I am building a Rasa chatbot and I have come accross a problem

my actions function akways only returns the first dispatcher command "dispatcher.utter_message(f"You said: {user_input}")" back to me and not the second. If anyone has a clue why please help.

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher

 

class ActionCaptureUserInput(Action):

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

    def run(
        self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]
    ) -> List[Dict[Text, Any]]:

        user_input = tracker.latest_message['text'] 
        intent_name = tracker.latest_message['intent']['name'] 

        dispatcher.utter_message(f"You said: {user_input}")
        dispatcher.utter_message(f"Detected intent: {intent_name}")


    return []```

Upvotes: 0

Views: 16

Answers (0)

Related Questions