Version: Rasa X 0.28.6
Hi,
I am trying to use two separate froms.But it keeps giving me error for same slot value from different actions.
my actions file looks like class FormComplainEntry(FormAction):
def name(self) -> Text:
return "form_enter_complain"
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
return ["query","issueOrderID"]
def validate_cancelorder(self,value: Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print("in validate_inviteemail")
return { "query": value,"issueOrderID": value}
# print("I m in")
# # slot_values=self.extract_other_slots(dispatcher, tracker, domain)
# # return self.validate_slots(slot_values, dispatcher, tracker, domain)
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return {
"issueOrderID": [self.from_entity(entity="issueOrderID", intent = "its_comp_id")],
"query": [self.from_entity(entity="query",intent = "my_query")],
}
def submit(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict]:
dispatcher.utter_message(template="utter_submit")
return []
second form action
class FormEnterCancelDetail(FormAction):
def name(self) -> Text:
return "form_cancel_order"
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
return ["IDtoCancel"]
def validate_cancelorder(self,value: Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
# print("in validate_inviteemail")
return {"IDtoCancel": value}
# # slot_values=self.extract_other_slots(dispatcher, tracker, domain)
# # return self.validate_slots(slot_values, dispatcher, tracker, domain)
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return {
"IDtoCancel": [ self.from_entity(entity="IDtoCancel", intent = "enter_id_to_cancel")]
}
def submit(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict]:
dispatcher.utter_message(template="utter_submit")
return []
It’s urgent.I am supposed to give demo tomorrow and it’s not working. Your help would be really appreciated.
Thanks