I want to use Watson Assistant to input text and print answers in Node-RED.
The Watson Assistant module is saved in "context", and I don't know how to print it.
I have placed the function module as shown in the illustration, so please advise me how to configure the function.
By "print it" i assume you mean to the debug?
If so you should be able to move it from where it is stored to msg.payload.
You can do this with a function node (see https://nodered.org/docs/writing-functions#storing-data)
e.g.
msg.payload = context.get('count')
or by using a change node.
But you will need to know the variable name it is stored in.
Given that flow, I'm not sure The Watson Assistant module is saved in "context",
means context as we know it. The WA node has its own option to store conversation context in the node - which is not 'context' in the Node-RED sense.
@labs180 it is not completely clear what you want to do. Passing the output fo the WA node to Debug will show you the structure of the message it sends. You can then use that to identify what parts of the message you want to access.
You may also need to set the debug node to see complete msg rather than just msg.payload.