简体   繁体   English

将IBM Watson Assistant聊天机器人连接到Db2

[英]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. 我目前已经设置了Watson chatbot,还设置了DB2数据库并设置了一些表。

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? 有人可以协助我如何在IBM Cloud函数中开发代码以连接chatbot和DB2服务,以及Dialog节点中的代码如何才能读取或写入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 . IBM Cloud解决方案教程展示了如何使用IBM Watson Assistant和IBM Cloud Functions为应用程序代码构建Db2驱动的聊天机器人 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. 相关的GitHub存储库包含适用于无服务器操作的工作代码,这些操作可以将新记录插入到Cloud Db2中,也可以根据聊天中输入的条件检索数据。

The file eventFetchDate.js would search for a specific event record within a given date range. 文件eventFetchDate.js将在给定日期范围内搜索特定事件记录。 You can use any supported programming language. 您可以使用任何受支持的编程语言。 The most important part is to pack the result into the structure expected by Watson Assistant. 最重要的部分是将结果打包到Watson Assistant期望的结构中。 The workspace file has the full set of dialog nodes and demonstrates how to interact with the user and Db2. 工作区文件具有完整的对话框节点集,并演示了如何与用户和Db2进行交互。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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