我在这里关注数字精灵文章: https ://developers.google.com/actions/develop/apiai/tutorials/number-genie
我已经把这些文件放在了这里的 github 存储库中:http: //github.com/quique123/mygennie
我在 Heroku 日志中得到了这个:
正文:{"originalRequest":{"source":"google","data":{"surface":{"capabilities":[{"name":"actions.capability.AUDIO_OUTPUT"}]},"inputs" :[{"arguments":[{"raw_text":"36","text_value":"36","name":"text"}],"intent":"assistant.intent.action.TEXT"," raw_inputs":[{"query":"36","input_type":2,"annotation_sets":[]}]}],"user":{"user_id":"sometring/mIqGRE=","permissions": []},"device":{"locale":"en-US"},"is_in_sandbox":true,"conversation":{"conversation_token":"[]","conversation_id":"1493419815932","type":2}}},"id":"e5ca3d68-3efa-4285-923f-3e1ff7fz87cf","timestamp":"2017-04-28T22:33:51.422Z","lang":"en","结果":{"source":"agent","resolvedQuery":"36","speech":"","action":"check_guess","actionIncomplete":false,"parameters":{"check_guess": "36"},"contexts":[{"name":"actions_capability_audio_output","parameters":{"check_guess.original":"36","check_guess":"36"},"lifespan":0}] ,"元数据":{"intentId":"c863e1e2-c950-45d8-9b96-b57e0b1de77e","webhookUsed":"true","webhookForSlotFillingUsed":"false","intentName":"provide_guess"},"fulfillment":{"speech":"","messages":[{"type":0,"speech":""}]},"score":1}," status":{"code":200,"errorType":"success"},"sessionId":"1493418215932"}
但是网络模拟器返回了一个抱歉,当我试图猜测一个数字时,它现在不可用。那么为什么 json 有效负载会有一个代码 200:success 呢?