Reputation: 3608
Im looking to implement IBM Watson Conversation in my project but one thing i couldnt understand is, How to integrate it with real time search. Example I want to provide Hotel Search Service to my customer, i want to extract entities like City, Date, No. Of Guests details from Conversation and search against my existing database. Is there a way to achieve it? Or Is there any service I should use to extract entities.
Upvotes: 3
Views: 2025
Reputation: 1326
The intended workflow that could be used for this particular use case would be to:
a) Use Waston Conversation to extract all the info you need to conduct the database search - City, Data, Number, etc... You could get this from the user by using the conversation to ask the user questions and store the answers in some context
variables.
b) When you gathered everything you need for the DB search you conduct the DB search but not in the Watson Conversation, but in your client application. So Watson Conversation will return an answer where you indicate somewhere (usually in the context
field) that now is the time Watson Conversation wants the client app to do some DB API call.
Typically you are implementing some web page in JavaScript or Node.js that communicates with Watson Conversation API. In this app when the watson conversation returns an response in the JSON format, you can parse this JSON look for your custom fields on context
that represents what should be searched for. You then do the DB search using some JS or Node.js API to your database and when this gets back with the answer, you can store the relevant parts of the answer back to the context
field to some custom variable, e.g. dbresponse
- this can be then worked with in Watson Conversation.
BOTTOM LINE: There is no way how to do external API calls from Watson conversation right now. You can do these calls in your client application and modify the context
field that is send back and forth in requests and responses to Watson Conversation service to integrate the answers with the dialog flow.
Upvotes: 3