简体   繁体   中英

Can Watson Assistant (Conversation) make an API as part of the dialog?

I am making API requests to Watson Assistant for getting the desired response.

Now instead of directly replying I want my Watson Assistant to call an API call (hit URL) then I will return something from that Requested URL.

Example: I have saved the information regarding students on my server. Now if a student sends a message like (I want to check my marks) then Watson will identify intent, entities and return a response that is saved on Watson. So Watson will basically identifies that student wants to know his marks.

Now, how do Watson sends this information to my server instead of directly sending it to the student, So I can see the marks for that particular student and return marks to the student?

This is doable. Watson Assistant has the concept of dialog actions . Actions can be executed server-side using IBM Cloud Functions or signaled to the client (app server) for execution.

Here is a tutorial that shows how the server-side actions are used to access a database and return data as part of a response .

IBM recently released a new webhook feature that is perfect for this. There's some documentation about it here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM