作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在尝试使用休息网络服务为 google 上的操作编写一个演示。
在用户打开操作(“与 testaction 对话”)并显示欢迎消息(通过主要意图)的那一刻。此初始意图需要用户响应,并通过 JSON 响应中的 possible_intents 字段设置下一个预期意图
根据 the documentation我应该能够在我的 HTTP JSON 响应的 possible_intents 中指定自定义意图。
但是,如果我使用“assistant.intent.action.TEXT”以外的任何意图,一旦我响应初始意图/提示,我就会收到以下错误:
Sorry, I did not understand.
{
"response": "...",
"expectUserResponse": true,
"conversationToken": "...",
"audioResponse": "...",
"debugInfo": {
"agentToAssistantDebug": {
"agentToAssistantJson": {
"conversation_token": "...",
"expect_user_response": true,
"expected_inputs": [
{
"input_prompt": {
[...]
},
"possible_intents": [
{
"intent": "testintent"
}
]
}
]
}
}
}
}
{
"response": "...",
"expectUserResponse": true,
"conversationToken": "...",
"audioResponse": "...",
"debugInfo": {
"agentToAssistantDebug": {
"agentToAssistantJson": {
"conversation_token": "...",
"expect_user_response": true,
"expected_inputs": [
{
"input_prompt": {
[...]
},
"possible_intents": [
{
"intent": "assistant.intent.action.TEXT"
}
]
}
]
}
}
}
}
最佳答案
使用 Actions SDK 时,仅支持 TEXT 意图。您必须使用自己的 NLU 来解析用户提供的原始文本输入。
如果您没有自己的 NLU,那么我们建议您使用 API.AI。
关于actions-on-google - ExpectedInputs/possible_intents 仅适用于 "assistant.intent.action.TEXT"吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41427697/
我目前正在尝试使用休息网络服务为 google 上的操作编写一个演示。 在用户打开操作(“与 testaction 对话”)并显示欢迎消息(通过主要意图)的那一刻。此初始意图需要用户响应,并通过 JS
我是一名优秀的程序员,十分优秀!