I am using a Rasa form to collect all of the necessary information in order to execute a specific type of query. I define slot mappings for each slot I want to fill in the domain file. E.g
forms:
object_query_form:
info_need_obj:
- type: from_entity
entity: info_need_obj
I also have a few required slots where none of the predefined slot mappings fit my use case, so I use a custom action to extract and slot those values from the users message. E.g.
class ValidateObjectQueryForm(FormValidationAction): def name(self) → Text: return “validate_object_query_form”
async def required_slots( self, slots_mapped_in_domain: List[Text], dispatcher: "CollectingDispatcher", tracker: "Tracker", domain: "DomainDict", ) -> Optional[List[Text]]: return slots_mapped_in_domain + ["identifier", "domain"] async def extract_domain( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict ) -> Dict[Text, Any]: val = code to extract slot return {"domain": val} async def extract_identifier( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict ) -> Dict[Text, Any]: val = code to extract slot return {"identifier": val}
When the user sends a message to the bot that includes all of the required entities right off the bat, the custom mapping functions are called, no problem. However, when the user does not provide all of the required entities and a slot is requested, say domain, when the user follows up with a domain, the custom mapping function is not called. Instead, Rasa attempts to auto-fill the slot based on the extracted entities (more specifically, using the from_entity mapping).
Why is it that the custom mapping function is not called after a slot is requested?
Just to provide you with some more information, the slots in my domain file are defined like this:
> slots:
> info_need_obj:
> type: any
> influence_conversation: false
> auto_fill: true
> domain:
> type: any
> influence_conversation: false
> auto_fill: false
> identifier:
> type: any
> influence_conversation: false
> auto_fill: false
Also, I am using Rasa version 2.4.0.