[英]How to integrate a chatbot webhook with a web-based chat window?
I want to develop a web-based chat conversation.我想开发一个基于网络的聊天对话。 I have a Dialogflow webhook that is up and running and that can be easily integrated with, say, facebook messenger or whatsapp, thanks to the functionalities of Dialogflow itself.
由于 Dialogflow 本身的功能,我有一个已启动并正在运行的 Dialogflow webhook,并且可以轻松地与 facebook Messenger 或 whatsapp 集成。
Now, say I want to have a web-based chat plugin that I want to interact with said Dialogflow webhook.现在,假设我想要一个基于 Web 的聊天插件,我想与所说的 Dialogflow webhook 进行交互。 How does that work, in terms of setup?
就设置而言,它是如何工作的? There are things I know I need, I would like your help to identify things that are still missing and to help me put them all together (conceptually).
有些东西我知道我需要,我希望你能帮助我找出仍然缺少的东西,并帮助我把它们放在一起(从概念上)。
Is this all I need?这就是我所需要的吗? I am sorry if this question is too confusing or broad, I'll be glad to give further clarifications as needed.
如果这个问题太混乱或太宽泛,我很抱歉,我很乐意根据需要提供进一步的说明。
I think you need this.我想你需要这个。
https://cloud.google.com/dialogflow/docs/quick/api#detect-intent-text-nodejs https://cloud.google.com/dialogflow/docs/quick/api#detect-intent-text-nodejs
When you use the API for interactions, your service interacts directly with the end-user.当您使用 API 进行交互时,您的服务会直接与最终用户进行交互。 For each conversational turn, your service sends end-user expressions to Dialogflow by calling the
detectIntent
or streamingDetectIntent
method of the Sessions
type.对于每个会话轮次,您的服务通过调用
Sessions
类型的detectIntent
或streamingDetectIntent
方法将最终用户表达式发送到 Dialogflow。 Dialogflow responds with information about the matched intent, the action, the parameters, and the response defined for the intent. Dialogflow 使用有关匹配的意图、操作、参数和为该意图定义的响应的信息进行响应。 Your service performs actions as needed (for example, database queries or external API calls) and sends a message to the end-user.
您的服务根据需要执行操作(例如,数据库查询或外部 API 调用)并向最终用户发送消息。
It just API interaction with your chat client, you can design the way you want.它只是 API 与您的聊天客户端交互,您可以设计您想要的方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.