google actions:如何在 actions sdk 中使用自定义 intents
google actions: how to use custom intents with actions sdk
这个问题是在将 google 动作与动作 SDK 一起使用时出现的。该文档给出了使用自定义购买意向的示例,如图所示
{
"name": "BUY",
"intent": {
"name": "com.example.sekai.BUY",
"parameters": [
{
"name": "color",
"type": "org.schema.type.Color"
}
],
"trigger": {
"queryPatterns": [
"find some $org.schema.type.Color:color sneakers",
"buy some blue suede shoes",
"get running shoes"
]
}
},
"fulfillment": {
"conversationName": "sekaiApp"
}
}
但是,nodeJS 中的 google 函数代码仅调用与 actions.intent.TEXT
关联的自定义逻辑。
我发现 article 提到在 actions SDK 中仅支持内置意图。
问题:是否可以使用 Actions SDK 设置自定义意图?如果可以,能否分享一个片段作为指导?
简而言之,Actions SDK 中的自定义 Intent 用于对话塑造,而不是 Intent 识别。所有语音或键入的输入都作为文本意图发送。预计将使用自然语言 Understanding/Processing 系统 (NLU/NLP) 完成识别,并且 Actions SDK 不提供 NLU/NLP.
在 example you cite 中,他们专门讨论深度链接触发事件,尽管类似的概念适用于其他会话 Intent。在每种情况下,这些短语都有助于确保向您发送正确的文本供您处理。
例如,如果没有这些提示,语音到文本模型可能会听到用户说出类似 "buy some blue soled shoes" 或 "get run in shoes" 的内容。您的系统可能无法理解这两者。
如果您正在寻找将短语(或类似短语)和参数与 Intents 匹配的 NLP 系统,您可以查看 Dialogflow 之类的东西,它与 Google 上的 Actions 很好地集成,或者您可以使用您选择的任何 NLP 库。
这个问题是在将 google 动作与动作 SDK 一起使用时出现的。该文档给出了使用自定义购买意向的示例,如图所示
{
"name": "BUY",
"intent": {
"name": "com.example.sekai.BUY",
"parameters": [
{
"name": "color",
"type": "org.schema.type.Color"
}
],
"trigger": {
"queryPatterns": [
"find some $org.schema.type.Color:color sneakers",
"buy some blue suede shoes",
"get running shoes"
]
}
},
"fulfillment": {
"conversationName": "sekaiApp"
}
}
但是,nodeJS 中的 google 函数代码仅调用与 actions.intent.TEXT
关联的自定义逻辑。
我发现 article 提到在 actions SDK 中仅支持内置意图。
问题:是否可以使用 Actions SDK 设置自定义意图?如果可以,能否分享一个片段作为指导?
简而言之,Actions SDK 中的自定义 Intent 用于对话塑造,而不是 Intent 识别。所有语音或键入的输入都作为文本意图发送。预计将使用自然语言 Understanding/Processing 系统 (NLU/NLP) 完成识别,并且 Actions SDK 不提供 NLU/NLP.
在 example you cite 中,他们专门讨论深度链接触发事件,尽管类似的概念适用于其他会话 Intent。在每种情况下,这些短语都有助于确保向您发送正确的文本供您处理。
例如,如果没有这些提示,语音到文本模型可能会听到用户说出类似 "buy some blue soled shoes" 或 "get run in shoes" 的内容。您的系统可能无法理解这两者。
如果您正在寻找将短语(或类似短语)和参数与 Intents 匹配的 NLP 系统,您可以查看 Dialogflow 之类的东西,它与 Google 上的 Actions 很好地集成,或者您可以使用您选择的任何 NLP 库。