Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我应该如何shouldEndSession在我的意图处理程序中将其设置为 false?
shouldEndSession
我试图做类似的事情:
response.shouldEndSession(false);
但它没有用。我正在使用 JavaScript。
如果您使用的是 Node.js,您应该能够执行以下操作:
response.shouldEndSession(false, "Reprompt your user here");
如果您仅使用纯 Javascript 并仅在返回对象中设置值,则您希望在响应中包含以下内容:
{ ... "reprompt": { "outputSpeech": { "type": "PlainText", "text": "Reprompt your user here" } }, "shouldEndSession": false }