LoginSignup
2
2

More than 5 years have passed since last update.

Dialogflow(旧:API.AI) のSmall Talkを使って一般的なリクエストの返答をカジュアルにしよう #dialogflow

Last updated at Posted at 2017-06-20

API.AIのSmall Talk

API.AIにはSmall Talkという機能があります。Small Talkは一般的な質問の答えを簡単にカスタマイズすることが出来る機能です。例えば「Who are you?」という質問の答えに対する言葉を複数用意しておくことが出来ます。※Small Talkで用意しなかった場合はAPI.AIのデフォルトのものが返されます。

新しいAgentの作成

  • Agent Name
    • SmallTalkTestProject
  • LANGUAGE
    • English

Small Talk

1.左側のメニューからSmall Talkを選択します。

Screen Shot 0029-06-20 at 9.30.02.png

2.Enableにチェックを付けます。

3.About agent を開きます。

4.「Who are you?」の返答候補に「I'm small talk's test project.」と入れます。

Screen Shot 0029-06-20 at 9.34.00.png

5.終わったら上部のSaveボタンを押してください。

6.右のシュミレーターに「Who are you?」と入れて、「I'm small talk's test project.」と返事が来たら成功です。

Screen Shot 0029-06-20 at 9.36.26.png

JSONデータにもしっかり記述されています♪

response.json
{
  "id": "6fc76197-8062-469b-a861-0c11dd71328e",
  "timestamp": "2017-06-20T00:36:22.396Z",
  "lang": "en",
  "result": {
    "source": "domains",
    "resolvedQuery": "Who are you?",
    "action": "smalltalk.agent.acquaintance",
    "actionIncomplete": false,
    "parameters": {},
    "contexts": [],
    "metadata": {},
    "fulfillment": {
      "speech": "I'm small talk's test project.",
      "messages": [
        {
          "type": 0,
          "speech": "I'm small talk's test project."
        }
      ]
    },
    "score": 1
  },
  "status": {
    "code": 200,
    "errorType": "success"
  },
  "sessionId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

このように一般的な返答を簡単に作成することができます。まだまだ沢山の返答候補が作れるのでぜひ試してみてください♪

2
2
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
2
2