我正在console.actions.google.com ....上创建自定义Google助手。因此,当我从我的REST API接收响应时,尽管我在成就-> Webhook部分正在Advance REST Client中运行,因此我没有得到响应!
我已经尝试调试它,该命中正确地发送到了我的REST Api,但是在测试它时,我想要的响应未在Google Assistant的模拟器上得到。
我已经创建了POST API以返回响应,如下所示:-
@PostMapping(value = "/echo")
@ForIntent("Default Welcome Intent")
public ActionResponse echo(ActionRequest request)
{
ResponseBuilder responseBuilder = getResponseBuilder(request);
responseBuilder.add("Welcome to my app");
return responseBuilder.build();
}
我收到来自Advance Rest Client的以下回复:-
{
"webhookResponse": {
"fulfillmentText": "Welcome to my app"
},
"appResponse": null,
"helperIntent": null,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Welcome to my app"
}
}
],
},
"conversationData$actions_on_google": null,
"googlePayload$actions_on_google": {
"appResponse": {
"expectUserResponse": true,
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Welcome to my app"
}
}
],
}
},
"possibleIntents": [
{
"inputValueData": {},
"intent": "actions.intent.TEXT"
}
],
}
],
},
"webhookResponse": null,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Welcome to my app"
}
}
],
},
"expectUserResponse": true,
"helperIntent": null,
"conversationData$actions_on_google": null,
"sessionId$actions_on_google": null,
"userStorage$actions_on_google": null,
"helperIntents$actions_on_google": null
},
"sessionId$actions_on_google": null,
"expectUserResponse": true,
"contexts$actions_on_google": [],
}
我在测试时通过模拟器的响应是:- 参加面试的面试官现在没有回应。请稍后重试。