FormAction SDK for Rasa
Installation :
npm i nodejs-formaction-sdk-rasa
Usage:
const handleFormAction = ;;
OR
const formAction = ;formAction;
Example:
const handleFormAction = ; const request = reqbody; // from express endpoint in external nodejs actions endpointconst required_slot = 'origin' 'destination' 'date';const entites = requesttrackerlatest_messageentities;const slots = requesttrackerslots;const templates = requestdomaintemplates;const nextAction = 'utter_flight_details';const senderID = requestsender_id;//SenderID is used to send out random unrepeating utterance if multiple utterance available. Optional feature to enhance user experience const formHandle = ;formHandle;
NOTES:
- TURN OFF AUTOFILL for SLOTS in domain, but use the same name as the ENTITIES for SLOTS - SlotFilling happens in the module
- Register utter_ask_<SLOT_NAME> this is used to dynamically utter a question back to the user.
- Register nextAction name - utterance/custom action name in domain. That action will called upon successfully completing slot filling.