简体   繁体   中英

Connect IBM Watson Assistant chatbot to Db2

I currently have a Watson chatbot set up and also have a DB2 database with some tables set up.

Could someone please assist me in how to develop a code in the IBM Cloud function to connect both the chatbot and DB2 services, as well as how the code in the Dialog nodes needs to be to either read or write to the tables in DB2?

This IBM Cloud solution tutorial shows how to build a Db2-driven chatbot with IBM Watson Assistant and IBM Cloud Functions for the app code . The related GitHub repository has working code for serverless actions that either insert a new record into Db2 on Cloud or retrieve data based on criteria entered within the chat.

The file eventFetchDate.js would search for a specific event record within a given date range. You can use any supported programming language. The most important part is to pack the result into the structure expected by Watson Assistant. The workspace file has the full set of dialog nodes and demonstrates how to interact with the user and Db2.

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