class ValidatePPForm(FormValidationAction):
def name(self) → Text:
return “validate_pp_form”
async def required_slots(
self,
slots_mapped_in_domain: List[Text],
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: "DomainDict",
) -> Optional[List[Text]]:
crop_name = tracker.slots.get("crop_name")
if crop_name is None:
return ["Could you please give the crop name"]
disease_name = tracker.slots.get("disease_name")
if disease_name is None:
return ["Could you please give the disease name"]
I gave this action name in action section of domain file. While running the bot, I get an error like below.
The user message which I gave in return - validate action is getting displayed in my action server window and not as a reply by bot to user. Kindly help me with this.
But it didn’t work. So commented the rules and added Story
This time it asked for the crop name, when I gave only disease. But tried to find the intent with only the new crop name that it received. I would like to club the crop name entity with previously received disease name and then find the intent and corresponding response. Please advise.
Rasa Version : 2.8.7
Minimum Compatible Version: 2.8.0
Rasa SDK Version : 2.8.2
Rasa X Version : None
Python Version : 3.7.6
Operating System : Windows-10-10.0.19041-SP0
@rsklearner Hi, you training examples should be increased generally recommended one is 2 and in some your intent examples mentioned is only 1, so I’d recommend to increased up to 5 or 10. Further, your training examples are like sentences, it that your use case demands?
@nik202 Sure, We have many additional data for each intent. We will add them as well. The data is more like Question and Response and so they are like sentences. Is this something I need to worry about?
@nik202
Instead of forms, I used only slot and used a db to pull response and now it is working fine. I also working on reducing the number of intents and increasing the sample records for each intent.