LoginSignup
0
1

More than 5 years have passed since last update.

Actions on GoogleとDialogflowのwebhook連携でサーバ側から会話を終了させる

Posted at

サーバ側から会話終了させる方法が判らず探してて、
DialogflowのDocsではなく、Google側のREFERENCEに記載があったので
忘れないようメモ代わりに記載。

expect_user_response 項目をfalseにしてDialogflowにjsonを返してあげれば
会話は終了します。
普段、会話を継続させる場合は頑張ってこの項目を付けなくても会話は継続していました。

{
    "contextOut": [{
        "name": "lastcontext",
        "lifespan": 2,
        "parameters": {
            "lastaction": "input.welcome",
            "Spot": "",
            "unknown_count": "0"
        }
    }],
    "responsedate": "2018-04-26 20:43:15",
    "speech": "ttt",
    "displayText": "",
    "data": {
        "google": {
            "expect_user_response": "true"
        }
    }
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1