technocreatives / node-red-contrib-wit-ai

Wit.ai integration for Node-RED
Other
2 stars 2 forks source link

Entities not being passed to Action Node #2

Open geneReeves opened 7 years ago

geneReeves commented 7 years ago

When the action node is fire the msg should contain the 'entities' just like the merge node. according to the info on wit.at, the action node should also receive the entities.

"This function will receive the current context as input, as well as the entities extracted from the user's last message."

when firing the mere node, this code is used:

          node.actions.merge.send({
            _steps: --i,
            _actionType: json.type, 
            sessionId: sessionId, 
            context: clonedContext, 
            entities: json.entities, 
            payload: message
          });

when firing the action node, this code is used:

          node.actions[action].send({
            _steps: --i,
            _actionType: json.type, 
            _action: action,
            sessionId: sessionId, 
            context: clonedContext, 
            payload: message
          });

which should be this instead:

          node.actions[action].send({
            _steps: --i,
            _actionType: json.type, 
            _action: action,
            sessionId: sessionId, 
            context: clonedContext, 
            entities: json.entities, 
            payload: message
          });

Thanks for the great node...

flight2k commented 7 years ago

Same issue for me. The action node don't have any entities.

Another thing is my merge node receive nothing. Maybe i don't understand this node but when i but a debug on merge i receiving nothing when i start a conversation.

Thanks for the very good job !!!