We’re building a bot and we’re planning to use FormAction. The implementation on the UI side requires us to use a specific format when outputting the Rasa response; hence we’re using dispatcher.utter_attachment.
Problem
The problem arises when we need to use utter_ask_{slot_name}. I saw in the docs we can use custom attribute in the domain.yml file under the template.
However when using it (and also trying the exact template from the docs), and training the Rasa core, I get the following error:
rasa.core.domain.InvalidDomain: Utter template 'utter_custom_test' needs to contain'- text: ' attribute to be a propertemplate
Here is the template:
templates:
utter_custom_test:
- custom:
blocks:
- type: section
text:
text: "Make a bet on when the world will end:"
type: mrkdwn
accessory:
type: datepicker
initial_date: '2019-05-21'
placeholder:
type: plain_text
text: Select a date
FYI, I’m using the latest docker images.
So, my questions are:
Is there a workaround? Is it possible to really send custom JSON as attachment using Custom Output Payloads?
Is it required to use utter_ask_{slot_name} for FormAction to work?
Hey @ameid, glad to hear you’re trying to work with custom json payloads! Exactly which latest docker images are you using? The reason I ask is because you shouldn’t be seeing that error message on the latest version. Custom json is only supported by the latest release (rasa/rasa and rasa/rasa_sdk).
Hi again @erohmensing! I just checked I’m still using the latest release of rasa/rasa_core and rasa/rasa_nlu; I haven’t noticed the rasa/rasa till now actually.
I used to follow the docker walkthrough in the old documentation, do you think the newer docs provide the same functionality as the older ones?
Also, are there any requirements for the training data to suit the new release?
Yes, the functionality should be the same Follow the new docker tutorial and let us know if you have any problems. Any migrations you should need can be found here – the training data hasn’t changed, I believe.
Hm what happens when you run your action server? It should show a list of registered actions before it says "up and running on ". If your action does not show up there, there’s either a problem in your action code or the command you’re using to run the actions. Are you tunning the action server with rasa run actions?
Hm can you find the action server logs? This should tell you what actions are registered on startup of the action server. Could you also share your action code? Is your actions.py in the main directory?
I had a problem with importing the module “requests” so I fixed it by extending the docker image of rasa_sdk. BTW, it was previously available in rasa_core_sdk so I didn’t think about it.
Ah, okay. Yes, we removed that requirement to pare down the image because we weren’t using it in our code, but we may add it back in since it’s widely used in custom actions. If not we’ll add the extension to the migrations. Thanks!