作为为与以下拓扑链接的帐户配置的操作的一部分:
Actions-on-Google->Dialogflow->Webhook ,
我看到 Google 助理在通过帐户链接流程之前注入了自己的消息,如下所示:
"I need to link your <action-name> to Google. Is that ok?"
链接流程由 webhook 中的以下内容触发:
public ActionResponse launchRequestHandler(ActionRequest request) throws Exception {
ResponseBuilder responseBuilder = getResponseBuilder(request);
responseBuilder.add(new SignIn());
}
我希望能够用自定义消息替换上述库存消息,但是当使用我们自己的消息将上下文附加到登录卡时,如下所示:
String speech = "Hi, I see that your account isn't connected. "
+ "I've sent a link to your Google Assistant app that will get you started and set up in just several simple steps. "
+ "Don't worry, I'll be here waiting, just call me when you're ready.";
responseBuilder.add(
new SignIn()
.setContext(speech));
我仍然看到最后附加的默认消息:
"Hi, I see that your account isn't connected.
I've sent a link to your Google Assistant app that will get you started and set up in just several simple steps.
Don't worry, I'll be here waiting, just call me when you're ready.,
I need to link your <action-name> to Google. Is that ok? "
如何用我自己的替换Google 默认消息?