How to Trigger API with Rivescript?

246 Views Asked by At

First of all i'm new to this Rivescript which is used for making chat bots. can any one help me how to trigger Rest API which is already implemented in NodeJS. i heard that some <call> tag will help for this but i'm not getting how to do that. Any example will be appreciated. Thanks in advance.

1

There are 1 best solutions below

0
On

We wanted to keep control on our side. So we ended up putting meta info in the rivescript file and wrote a custom parser which will make API call.

+ hi
- hi. | API:greeting

Parser splits the response by | and then all values on right side are for API. This can be extended to have any number of parameter to support all kinds of API calls.

This is NOT Rivescript way, but good thing is that it's flexible and allows you to do things in your favorite programming language (rather than depending on Rivescript).