Description of API of Nodejs Bot
AnsweredHello,
I did the first tests with the Rainbow Bot Library. Now I would have to ask if there is an extended documentation / examples for the following Actions:
- Message: For sending a message to the user
- Choice: For asking the user to choose between a list of possible answer
- Question: For asking a free answer from the user
- External: For giving the hang to the Node.JS application without interaction with the user
- Command: For sending a command to execute (Unofficially supported)
Interesting are especially the last two (External, Command) 😉
For the others I've seen on GitHub examples
Thanks
-
Official comment
Hi Raphael,
Rainbow chatbot is an open source contribution we made early this year to allow building chatbot that executes a scenario.
These 2 kinds of actions allow developers to extend the Rainbow Chatbot.
Action of type External:
This action does nothing internally. This action only calls the callback « onMessage » to give the hand to the application for executing a specific task like calling Google AI, storing data to a database… Once the external action is done, the chatbot continues its scenario. More information of handling this callback can be found here: https://github.com/Rainbow-CPaaS/Rainbow-Chatbot#handling-user-inputs-and-changing-route
Action of type Commands
This actions send a custom chat message to the user (of type command). By doing that, user application knows that the chat message received is not a friendly message to display from the bot but an action to do. The content of the message represents the action or parameter to execute or to manage.
This action is not officially supported because our Rainbow official applications will display these kind of messages as a « text message ».
Hope this will answer to your question.Feel free to add any contributions to this library.
Regards,
Olivier
Comment actions -
Hi,
I am not sure I totally got you.
Documentation may be found for example here https://hub.openrainbow.com/#/documentation/doc/sdk/node/api/imBut what do you mean with "extended documentation" ?
And examples, as you said may be found on github https://github.com/Rainbow-CPaaS
For example a standalone chat bot: https://github.com/Rainbow-CPaaS/Rainbow-ChatbotCould you please explain me your two points:
- External: For giving the hang to the Node.JS application without interaction with the user
- Command: For sending a command to execute (Unofficially supported)Thanks,
Pascal -
Hi,
In your documentation on the page
https://github.com/Rainbow-CPaaS/Rainbow-Chatbot, isaw that there are several actions in the JSON file Possible.one of those are:
-
External: For giving the hang to the Node.JS application without interaction with the user
-
Command: For sending a command to execute (Unofficially supported)
I for me it's now not totaly clear what you mean with this Command. That's why a Extendet Documenation.
I would try to Extend my Bot with Google AI, that's why i'm asking.
Regards Raffael
-
Please sign in to leave a comment.
Comments
3 comments