- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试从网络钩子(Hook)发送响应来触发更改到另一个界面的过程,但 Actions on Google 总是抛出异常:
MalformedResponse 'final_response' must be set.
这并不是很有帮助。
这是我返回的 JSON:
{
"payload": {
"google": {
"expectUserResponse": true,
"conversationToken": "{\"data\":{}}",
"userStorage": "{\"data\":{}}",
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "PLACEHOLDER"
}
}
]
}
},
"possibleIntents": [
{
"intent": "actions.intent.NEW_SURFACE",
"inputValueData": {
"@type": "type.googleapis.com/google.actions.v2.NewSurfaceValueSpec",
"capabilities": [
{
"name": "actions.capability.SCREEN_OUTPUT"
}
],
"context": "Sure, I have some sample images for you.",
"notificationTitle": "Sample Images"
}
}
]
}
]
}
}
}
在 Dialogflow 上,我设置了 2 个意图;一个意图返回此处指定的 json,另一个意图包含事件 actions_intent_NEW_SURFACE,因此我知道用户对更改表面问题的响应。
我一直在阅读这些网站:
https://developers.google.com/actions/assistant/surface-capabilities#multi-surface_conversations
https://dialogflow.com/docs/reference/api-v2/rest/Shared.Types/WebhookResponse
https://developers.google.com/actions/build/json/dialogflow-webhook-json#dialogflow-response-body
Action On Google, webhook response with actions.intent.NEW_SURFACE (这似乎和我有同样的问题,但OP没有写响应。)
但是他们都没有让我对这个问题有任何了解。
最佳答案
您似乎正在尝试发送完整的 Action SDK 正文作为 Dialogflow 响应的一部分。虽然 JSON 的 payload.google
部分包含与 Action SDK 响应类似的对象,但存在一些差异。您可以看到https://developers.google.com/actions/build/json/dialogflow-webhook-json#dialogflow-response-body有关使用助手时响应应该是什么的完整示例,但我认为您的响应需要类似于
{
"payload": {
"google": {
"expectUserResponse": true,
"userStorage": "{\"data\":{}}",
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "PLACEHOLDER"
}
}
]
},
"systemIntent": {
"intent": "actions.intent.NEW_SURFACE",
"inputValueData": {
"@type": "type.googleapis.com/google.actions.v2.NewSurfaceValueSpec",
"capabilities": [
"actions.capability.SCREEN_OUTPUT"
],
"context": "Sure, I have some sample images for you.",
"notificationTitle": "Sample Images"
}
}
}
}
}
关于dialogflow-es - Dialogflow 从 webhook 更改界面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52377551/
自从我将 Dialogflow 升级为使用 v2 API 后,出现以下错误: Dialogflow IntentHandler not found for intent: myIntent 由于某些原
PermissionDenied:拒绝了“projects/XXXX-live/agent”上的403 IAM权限“dialogflow.sessions.detectIntent”。 创建服务时,我
基本上,我的代理人是法国人,当我输入 10h(12 小时格式为上午 10 点)时,我的 DialogFlow 代理人理解 22h(晚上 10 点),但我希望他理解上午 10 点。 (我想要 24 小时
我和我的团队正在使用 Dialogflow 为 Facebook Messenger 构建一个机器人,但由于我们的用户不会说同一种语言(西类牙语是项目中的默认语言),我们想要实现我们项目的英文版本,但
我是新来的 DialogFlow ,我开始创建代理,从smaltalk从头开始。问题是如何将更多预构建代理(例如警报和应用程序管理,以及货币转换器)附加到新创建的代理中? 谢谢你的帮助。 最佳答案 您
在 Dialogflow 中,通过扩展设置为自动化的“训练实体”的最佳方法是什么。在训练短语中添加实体和在实体屏幕中简单地添加示例值之间有什么区别吗? Dialogflow 培训是否比另一个更重视?创
我正在尝试训练 Dialogflow 机器人来识别不同的旅行请求(航类预订、酒店预订等)。我发现如果没有将时间指定为 12 小时格式(使用 AM/PM),它就不能正确解析时间。 我需要周六 08:00
我正在使用 webhook 在 dialogflow 上制作一个机器人。我收到一个错误:DEADLINE_EXCEEDED。我的 webhook 需要 5 秒多一点的时间来返回响应。有没有办法允许超过
我正在使用 Dialogflow 为银行创建一个机器人。我想保留与客户代表交谈的选择权。如果客户想与客户代表交谈,机器人应该停止,客户代表开始与客户聊天。在 Dialogflow 中如何实现。 最佳答
每当我输入 6 月 37 日作为输入时,它都不会给出错误,而是将日期视为 6 月 30 日。我想要做的是在输入 6 月 37 日时创建一个错误提示。 我在一个非常简单的意图上使用@sys.date,它
有没有办法以编程方式获取 Dialogflow 代理的对话历史记录? 我使用 Dialogflow 制作了一个聊天机器人。现在我需要以编程方式获取代理的对话历史记录。 最佳答案 That featur
我正在研究 dialogflow 跟进意图。结构是这样的。 它为每个新意图创建新上下文。 例如在重复意图中看到 每当我创建任何新意图时,它都会为其创建新上下文。正如你在图片中看到的那样。当我尝试删除这
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 4 年前。 Improve this qu
例如,如果您有 IntentA 并添加了 2 个后续意图:IntentB、IntentC,它工作正常,它应该添加一个上下文,因为它还没有输出上下文。但这就是问题所在。有时如果你添加另一个,例如 Fal
我正在使用 dialogflow 开发语音助手,我对意图的生命周期有疑问。据我了解,生命周期值为我提供了此意图中可能的交互次数。它在每次交互时递减,当等于 0 时,该值不能被识别为意图的可能值。 生命
我创建了一个聊天机器人,它会通知用户我(大)家庭成员的姓名以及他们的生活地点。我用 MySQL 创建了一个小型数据库,其中存储了这些数据,并在适当的时候使用 PHP 脚本获取它们,具体取决于用户与聊天
我想使用 dialogflow 进行注册。例如:我想让机器人问以下问题: 你叫什么名字?你的邮箱是多少? 等等。 我尝试实现此功能,但无法正确管理意图。我应该怎么做才能实现这一目标?谢谢 最佳答案 首
我希望尽可能生成动态文本而不需要创建 webhook。我知道创建动态文本的唯一方法是根据参数创建不同的路由或通过 using inline system functions像文本实现中的 $sys.f
我使用 创建了一个聊天机器人对话流 并与 集成Telegram、Facebook Messenger 和 Web . Dialogflow 的响应是通过 创建的履行用 Python 编写。 在 Tel
我使用 Dialogflow 创建了多个代理,其中许多都在生产中。但是,Dialogflow 项目突然消失了,现在我只能看到创建新代理的选项。 但是,我看到生产代理运行良好。我通过我创建的连接到 Di
我是一名优秀的程序员,十分优秀!