简体   繁体   English

IBM Watson Assistant:如何从对话框进行API调用

[英]IBM Watson Assistant: How to make API calls from dialog

We have integrated IBM Watson Assistant skill/workspace with a Facebook page using the Watson features. 我们使用Watson功能将IBM Watson Assistant技能/工作区与Facebook页面集成在一起。 We did this using an integrated approach from Virtual Assistants tab. 我们使用“虚拟助手”选项卡中的集成方法进行了此操作。

We are able to get the response in Facebook Messenger from Watson skill/workspace FAQS. 我们可以从Watson技能/工作区常见问题解答中在Facebook Messenger中获得答复。 Now we want to add a few more questions to skill/workspace and get the response from a database. 现在,我们想向技能/工作区添加更多问题,并从数据库中获得响应。

We know that we can use IBM Cloud Functions to get DB data and respond back with the data, but Cloud Functions action types (web_action and cloud_function or server) incur a cost, hence we are looking for another approach. 我们知道我们可以使用IBM Cloud Functions来获取数据库数据并用数据进行响应,但是Cloud Functions操作类型(web_action和cloud_function或服务器)会产生成本,因此我们正在寻找另一种方法。

We have our own APIs developed for the DB and want use those in Watson Assistant dialogue node actions. 我们为数据库开发了自己的API,并希望在Watson Assistant对话节点操作中使用这些API。 Please let us know how we can add it in actions and get a response from the API without using client application/cloud functions. 请让我们知道如何在不使用客户端应用程序/云功能的情况下将其添加到操作中并从API获得响应。

Note: we haven't developed any application for this chatbot, we directly integrated Watson skill/workspace with the Facebook page and trying to call API calls wherever we require them from the dialogue nodes. 注意:我们尚未为该聊天机器人开发任何应用程序,我们直接将Watson技能/工作区与Facebook页面集成在一起,并尝试在对话节点中需要它们的任何地方调用API调用。

As you can see, IBM Watson Assistant allows to invoke three different types of actions from a dialog node . 如您所见, IBM Watson Assistant允许从对话框节点调用三种不同类型的操作

  • client, 客户,
  • server (cloud_function), 服务器(cloud_function),
  • web_action. web_action。

Because for cloud_function and web_action the action is hosted as Cloud Function on IBM Cloud, the computing resources are charged. 因为对于cloud_function和web_action,该操作作为IBM Cloud上的Cloud Function托管,所以需要对计算资源进行收费。 For type client, your app would handle the API call and the charges depend on where your app is hosted. 对于类型客户端,您的应用将处理API调用,并且费用取决于您的应用托管的位置。 Thus, there are always costs. 因此,总有成本。

What you could do is to write a wrapper function that is deployed as web_action or cloud_function. 您可以做的是编写一个包装函数,将其包装为web_action或cloud_function。 Thus, there isn't much of computing resource needed and the charges would be minimal. 因此,不需要太多的计算资源,并且费用将最小。 But again, independent of the action type, there are always costs (maybe not charges) - one way or another... 但是同样,与动作类型无关,总是有成本(也许不是费用)-一种或另一种方式...

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

相关问题 IBM Watson Assistant:如何从选定的对话框选项中检索输入值? - IBM Watson Assistant: How to retrieve input value from chosen dialog option? IBM Watson Assistant:如何创建只接受一种实体的对话框 - IBM Watson Assistant: How to create dialog that will only accept 1 kind of entity IBM Watson Assistant:如何通过禁用输入字段来关闭对话框? - IBM Watson Assistant: How to close dialog by disabling input field? IBM Watson Assistant:如何允许从具有非条件子节点的对话节点离题? - IBM Watson Assistant: How to allow digressions from dialog node with a non-conditional child node? IBM Watson Assistant:如何处理来自对话框的上下文变量? - IBM Watson Assistant: How can i handle context variable coming from the dialog? Watson Assistant Api称为计数 - Watson Assistant Api calls count IBM Watson Assistant:如何通过 API 获取意图列表? - IBM Watson Assistant: How to get list of intents by API? IBM Watson Assistant:如何将 Db2 的查询结果作为 CSV 文件下载? - IBM Watson Assistant: How to make query result from Db2 downloadable as CSV file? 如何查找 IBM Watson Assistant 的 API 详细信息,例如 URL 和凭证 - How to find API details like URL and credentials for IBM Watson Assistant Watson Assistant(对话)能否将API作为对话框的一部分? - Can Watson Assistant (Conversation) make an API as part of the dialog?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM