我有一个Google Actions SDK项目,我正在使用nodejs client library来实现目标。我在尝试使用Confirmation
Helper意图时遇到了一些问题。它覆盖了之前的所有响应。让我给您一个简化的例子:
但是在模拟器中,我只听到第二个问题。我针对的是“仅语音”情况,因此我确实需要所有回复。有趣的是,我可以在模拟器的AUDIO
标签中看到所有响应。我怎么能听到这两个短语?
我正在复制/粘贴响应JSON,如RESPONSE
选项卡中所示。
{
"expectUserResponse": true,
"expectedInputs": [
{
"possibleIntents": [
{
"intent": "actions.intent.CONFIRMATION",
"inputValueData": {
"@type": "type.googleapis.com/google.actions.v2.ConfirmationValueSpec",
"dialogSpec": {
"requestConfirmationText": "Do you want today's weather report?"
}
}
}
],
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Hope you are doing well!"
}
}
]
}
}
}
],
"conversationToken": ""
}
我该如何解决这种情况。谢谢!
这是故意行为,因为使用诸如“确认”之类的意图之一是唯一的响应,而其他响应将被忽略。
有两种潜在的解决方法。