简体   繁体   English

如何将IBM Watson Assistant与Watson Discovery链接

[英]How can I link IBM Watson Assistant with Watson Discovery

I wish to make a chatbot using the two services listed in the title. 我希望使用标题中列出的两个服务创建一个聊天机器人。 Watson assistant is used to make the dialog for the chatbot while watson discovery allows for finding information in a large variety of documents such as .html, .pdf files. Watson助手用于为聊天机器人创建对话框,而Watson Discovery则允许在各种文档(例如.html,.pdf文件)中查找信息。 I want to make a chatbot that uses these two services. 我想制作一个使用这两项服务的聊天机器人。

The way the chatbot would work is that when a user says something into the chatbot, it will go through watson discovery and run that query which will then return results back to the user. 聊天机器人的工作方式是,当用户对聊天机器人说一些话时,它将通过Watson发现并运行该查询,然后将结果返回给用户。

I currently know how to use Watson Discovery and Watson Assistant but I am unaware how to link them together. 我目前知道如何使用Watson Discovery和Watson Assistant,但是我不知道如何将它们链接在一起。 I know its possible because I have seen demos on this but the ones who have made those demos give a lack in instructions to produce the chatbot. 我知道这是有可能的,因为我已经看过有关此演示程序的演示,但是进行这些演示的演示人员却缺乏生产聊天机器人的说明。

You could link Watson Discovery from within a dialog action of Watson Assistant. 您可以从Watson Assistant的对话框动作中链接Watson Discovery。 I have done that and described that method in the " 5 minute barebone news chatbot ". 我已经做到了,并在“ 5分钟准系统新闻聊天机器人 ”中描述了该方法。 That blog post links to the full source code on GitHub . 该博客文章链接到GitHub上完整源代码

Basically, within a dialog node I defined a client action. 基本上,在对话框节点中,我定义了一个客户端动作。 That action performs the call to Watson Discovery and returns the found items to the dialog node. 该操作将执行对Watson Discovery的调用,并将找到的项目返回到对话框节点。 There, it is presented as part of the chatbot response. 在那里,它作为聊天机器人响应的一部分呈现。 In a similar way, you could pack that action as Cloud Function and execute it as server action. 以类似的方式,您可以将该操作打包为Cloud Function并作为服务器操作执行。

"actions": [
        {
          "type": "client", 
          "name": "henriktest", 
          "parameters": {
            "topic": "<? $topic ?>", 
            "input": "<? input ?>"
          }, 
          "result_variable": "myNews"
        }
]

You might want to look at the new "Search Skill" feature in Watson Assistant. 您可能需要查看Watson Assistant中新的“搜索技能”功能。 Though it is still in Beta phase, it provides a seamless integration between Assistant and Discovery out of the box. 尽管它仍处于Beta阶段,但它提供了开箱即用的助手和发现之间的无缝集成。

https://cloud.ibm.com/docs/services/assistant?topic=assistant-skill-search-add https://cloud.ibm.com/docs/services/assistant?topic=assistant-skill-search-add

It is available to Plus or Premium plan users only. 它仅适用于高级或高级计划用户。

Alternatively you can check this code out. 或者,您可以签出此代码。 https://github.com/watson-developer-cloud/assistant-with-discovery https://github.com/watson-developer-cloud/assistant-with-discovery

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

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