Hi all,
I am trying to build a chatbot using Rasa and I am using the following packages:
rasa-core==0.14.5 rasa-core-sdk==0.14.0 rasa-nlu==0.15.1 rasa-sdk==1.7.0
My custom action file code is:
class ApiAction(Action):
def name(self):
return "action_retrieve_news"
def run(self, dispatcher, tracker, domain):
# print ("Reached action_retrieve_news")
# topic = tracker.get_slot('topic')
response = {"text":"News are Blah Blah Blah"}
dispatcher.utter_message(text="News are Blah Blah Blah")
return []
And my endpoint is
action_endpoint:
url: "http://localhost:5055/webhook"
I am running the server using the following commands:
python -m rasa_sdk --actions actions
python -m rasa_core.run -d models/dialogue -u models/nlu/default/chat --endpoints endpoints.yml --debug
The issue is dispatcher is not returning any response. I am not seeing the text âNews are Blah Blah Blahâ. Can anyone please help me with that?
This is the debug logs I am seeing when the custom action is triggered:
2020-02-12 19:36:50 DEBUG rasa_core.policies.memoization - Current tracker state [{âentity_topicâ: 1.0, âprev_action_retrieve_newsâ: 1.0, âslot_topic_0â: 1.0, âintent_ask_news_with_topicâ: 1.0}, {âprev_utter_continue_conversationâ: 1.0, âentity_topicâ: 1.0, âslot_topic_0â: 1.0, âintent_ask_news_with_topicâ: 1.0}, {âintent_agreeâ: 1.0, âprev_action_listenâ: 1.0, âslot_topic_0â: 1.0}, {âintent_agreeâ: 1.0, âprev_utter_ask_topicâ: 1.0, âslot_topic_0â: 1.0}, {âentity_topicâ: 1.0, âprev_action_listenâ: 1.0, âslot_topic_0â: 1.0, âintent_ask_news_with_topicâ: 1.0}]
2020-02-12 19:36:50 DEBUG rasa_core.policies.memoization - There is no memorised next action
2020-02-12 19:36:50 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_0_KerasPolicy
2020-02-12 19:36:50 DEBUG rasa_core.processor - Predicted next action âaction_retrieve_newsâ with prob 0.82.
2020-02-12 19:36:50 DEBUG rasa_core.actions.action - Calling action endpoint to run action âaction_retrieve_newsâ.
2020-02-12 19:36:50 DEBUG rasa_core.processor - Action âaction_retrieve_newsâ ended with events ââ