FormAction Submit fails to use dispatcher
See original GitHub issueRasa version: 1.5.0 Python version: 3.6.8
Operating system: Windows 10
Issue:
After succesfully asking for every slot to be filled, the bot submits the form. Inside the submit method, I am using a custom utterance:
response = dict(
x=tracker.get_slot('x'),
y=tracker.get_slot('y'),
z=tracker.get_slot('z'),
a=tracker.get_slot('a'),
b=tracker.get_slot('b'),
text='utter_submit_success'
)
dispatcher.utter_message(json_message=response)
return []
Since you marked the other utterance-methods as deprecated, I am now testing this one. The following code lies in executor.py of rasa_sdk:
message = {
"text": text,
"buttons": buttons,
"elements": elements,
"custom": json_message,
"template": template,
"image": image,
"attachment": attachment,
}
message.update(kwargs)
print(message)
self.messages.append(message)
and results in:
2019-11-27 17:31:00 DEBUG rasa_sdk.forms - No slots left to request, all required slots are filled:
x: True
y: 4
z: ['4', '4']
a: 4sdf
2019-11-27 17:31:00 DEBUG rasa_sdk.forms - Submitting the form 'incident_form'
{'text': None, 'buttons': None, 'elements': (), 'custom': {'x': True, 'y': '4', 'z': ['4', '4'], 'a': '4sdf', 'b': None, 'text': 'utter_submit_success'}, 'template': None, 'image': None, 'attachment': None}
2019-11-27 17:31:00 DEBUG rasa_sdk.forms - Deactivating the form 'incident_form'
2019-11-27 17:31:00 DEBUG rasa_sdk.executor - Finished running 'incident_form'
So there is no error, but _utter_responses which iterates over the dispatchers utterances is never triggered aswell whereas while filling the slots, it actually is triggered.
So it seems that messages sent out of the submit method aren’t parsed. Am I doing something wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Form Action utter_message not working
For the above python script, dispatcher.utter_message works for action_hello_world but not for FormAction in rasa shell. Very confused about why ...
Read more >Redux - Dispatch action when form is submitted
I am having trouble setting the redux state for a user once a login form is submitted in my react application.
Read more >HTML Syntax Reference - Application Dispatcher
If you want to invoke the Application Dispatcher with a hypertext link, an inline image, or other URL, use the default method GET....
Read more >Installation of SAP Web Dispatcher for SAP Systems Based ...
But unlike the ICM, the SAP Web Dispatcher does not directly pass incoming requests to a work process (such as a server process)–...
Read more >[org.apache.struts2.dispatcher.Dispatcher] Could not find ...
Dispatcher ] Could not find action or result Error ... Send. Hello to all, i tried to code the following simple struts but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Perfect. It works! 😃
Exactly - the print statement was added to make sure that the utterance itsself is generated correctly. It seems to me that it does not get processed.