You can check out this post on how to use forms: Building contextual assistants with Rasa Forms
Rather than using a custom action for just filling a product slot, you could use the validate_[slot]
method in forms to validate whenever the slot is filled.
For the slot value to be set to whatever the user enters, you can use sth like this in the slot_mapping
function.
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return {
"loan_amount": self.from_text(intent=None),
}
For more details about the above answer, read the blog post. It’s really good for getting started with forms.