我使用Actions SDK
创建actions on google
助理应用。我已成功创建项目并部署到Google操作(API的firebase),它曾在模拟器中按预期工作。但是最近我测试应用程序的时候,MAIN意图被成功触发,这很好,但其余的对话没有发送到API,其余的对话被谷歌接管,不知道为什么
这是我试过的对话
[me:]talk to my test app
[actions:] Hello Ravi, Welcome to your test app
[me:]I need to buy some clothes
[actions:] Sure, I found some pictures for you (this is no my data, this conversation is not being triggered from my external API, I don't see any API being triggered, but Im getting this message)
为了避免我的代码可能存在损坏,我尝试了https://github.com/actions-on-google/actionssdk-say-number-nodejs代码。它也不起作用。
所以我的问题是:
谷歌上的动作最近是否有任何可能已经破坏的变化?我之前使用README.md中的相同说明设置了actionssdk-say-number-nodejs
,但现在它给出了我奇怪的错误(firebase部署抛出错误,所以我使用`firebase serve --only函数,并使用ngrok创建履行API)
以下是该数字演示的输出
更新
我能够成功调用API并获得我需要的响应,但谷歌没有回复相同的内容。这是我用来发送消息的代码" 12"而它
请求
curl -X POST -H "Content-Type: application/json" -H "Google-Actions-API-Version: 2" https://mysitexxx.com/googleBot -d '{"user":{"userId":"ABwppHFnb3A--t4hBOstJLDgWZUrFJv4uku1ClJhv8dHtdZvUolLXGbTA_SWyM8ulvjcbCsBy3Fvhaw","locale":"en-US","lastSeen":"2017-12-11T09:22:58Z"},"conversation":{"conversationId":"1512984211990","type":"NEW"},"inputs":[{"intent":"actions.intent.TEXT","rawInputs":[{"inputType":"KEYBOARD","query":"12"}]}],"surface":{"capabilities":[{"name":"actions.capability.AUDIO_OUTPUT"},{"name":"actions.capability.SCREEN_OUTPUT"}]},"isInSandbox":true,"availableSurfaces":[{"capabilities":[{"name":"actions.capability.AUDIO_OUTPUT"},{"name":"actions.capability.SCREEN_OUTPUT"}]}]}'
然后我回复说#34;你说12"
响应
{"conversationToken":"{\"state\":null,\"data\":{}}","expectUserResponse":true,"expectedInputs":[{"inputPrompt":{"initialPrompts":[{"ssml":"<speak>You said, <say-as interpret-as=\"ordinal\">12</say-as></speak>"}],"noInputPrompts":[{"ssml":"I didn't hear that."},{"ssml":"If you're still there, say that again."},{"ssml":"We can stop here. See you soon."}]},"possibleIntents":[{"intent":"actions.intent.TEXT"}]}]}
但是这个反应会在模拟器中显示出来;实际上,当我从动作模拟器输入12时,我的API没有收到来自模拟器的请求