I create a form with three questions two of them are free_text() saving the full text of the user’s message to the slot and one is an entity with type categorical. the problem is if the user answers one question that has type from_text and writes a message contain a word that matches the value that I provided to an entity in another slot is extracted as the value of an entity how can I solve this problem?
Hi @mai, you can use Mapping Conditions to decide when the slot should be filled
I tried to use it but because I’m using Rasa version 2 so the mapping condition only works in rasa version 3 . the below image show, my code of form for three slots in the domain file
If the slot type is set to text, with every user utterance the slot will be filled.
Instead, you can use custom actions in the following way to fill the slot with user text,
def foo():
...
last_user_message = tracker.latest_message("text")
return [SlotSet("title", last_user_message)]