简体   繁体   English

使用 Google Actions 保持用户和代理之间的聊天

[英]Maintaining a chat between user and agent using Google Actions

I am creating an app using Dialogflow and Actions on Google Node.js library.我正在使用 Google Node.js 库上的 Dialogflow 和 Actions 创建一个应用程序。 The logic I am trying to implement is as follows:我试图实现的逻辑如下:

  1. User says: Initiate chat .用户说:发起聊天
  2. That user request triggers my webhook which then supplies the agent response.该用户请求触发我的 webhook,然后提供代理响应。
  3. User replies back to the agent - this is the tricky part because the user reply can be anything, thus the wrong Intent or the Fallback Intent can be triggered.用户回复给代理——这是一个棘手的部分,因为用户回复可以是任何东西,因此可能会触发错误的意图或回退意图。

Is there a way to allow for the unpredictability of a user's response and to keep conversation going between user and agent?有没有办法允许用户响应的不可预测性并保持用户和代理之间的对话? In another words, always trigger the same Intent (Chat Intent) regardless of what the user says?换句话说,不管用户说什么,总是触发相同的意图(Chat Intent)?

In Dialogflow, you can configure the Default Fallback Intent to connect to web fulfillment.在 Dialogflow 中,您可以配置默认回退意图以连接到 Web 实现。 In your fulfillment, you can then route the user's query to your webhook and process a response however you'd want.在您的实现中,您可以将用户的查询路由到您的 webhook 并根据需要处理响应。

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

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