官术网_书友最值得收藏!

Creating your first agent

Now, you are ready to create the FAQs chatbot. Let's navigate back to Dialogflow. Then, log into Dialogflow and create an agent called FaqChatBot. Ensure that you enable API VERSION to Dialogflow V2 API

The following screenshot shows the Dialogflow development interface, where you can start creating an agent:

Creating a Dialogflow agent

You can think of a Dialogflow agent as a voice translator that receives the user's voice from a device such as a mobile phone or Google Home, and then applies natural language processing to it, converting the user's voice into JSON format so that the user's request can be processed by the backend application server. Then, the backend application server will respond to the Dialogflow agent in JSON format, containing an instruction as to how to respond to the user. Upon receiving the message, the Dialogflow agent will send it back to the device along with the instructions of what to say to the user, and the device will speak to the user with the response.

The following chart shows the process flow of a Dialogflow agent:

Dialogflow agent process flow

Once the FaqChatBot agent has been created, we can take a look at the agent's settings. First, in the General settings, take a note of the API KEYS section; you will need the client access token and developer access token later, in Chapter 4Hosting, Securing, and Testing Fortune Cookie in the Cloud, to programmatically access the Dialogflow agent using the Dialogflow SDK.

The following screenshot shows the FaqChatBot agent settings:

FaqChatBot agent settings-general

The following are the different sections of an FaqChatBot agent:

  • Languages: In the Languages section, you can add multiple languages that the FaqChatBot can understand and translate and, for the purpose of this book, we will be using English.
  • ML Settings: If you look at the ML Settings tab, you will notice the ML CLASSIFICATION THRESHOLD setting. The ML CLASSIFICATION THRESHOLD can be set between 0 and 1, and the default value is set at 0.3. You can think of the ML classification threshold as how confident the FaqChatBot agent is that the agent understood what the user just said. If the agent understood the user request, it will know how to respond; if not, it will tell the user that it did not understand what they said. You will learn more about the ML CLASSIFICATION THRESHOLD in the What are Intents? section of this chapter.
  • Export and Import: In this section, the FaqChatBot can be backed up into the .zip file, restored from the .zip file by replacing the old version of the FaqChatBot agent, and can be imported from the .zip file, whereby the old one will be completely removed and restored from the .zip file.
  • Share: In the Share section, you can give permissions to other developers of the FaqChatBot. This is useful if you have many developers working on a very large project in order to divide the work.

The following screenshot shows the Export and Import section of the FaqChatBot agent:

 
FaqChatBot agent settings - export and import

The following screenshot shows the Share section of the FaqChatBot agent:

FaqChatBot agent settings - share
主站蜘蛛池模板: 靖江市| 江山市| 义马市| 拉萨市| 若尔盖县| 堆龙德庆县| 若羌县| 江阴市| 德江县| 汝州市| 融水| 峡江县| 南澳县| 海安县| 巩留县| 双城市| 海阳市| 临夏县| 左云县| 宣城市| 丁青县| 大安市| 光山县| 蕲春县| 江孜县| 雷波县| 迭部县| 准格尔旗| 东光县| 克拉玛依市| 阿鲁科尔沁旗| 南丰县| 海门市| 陵水| 紫金县| 舞钢市| 宜兰县| 阳谷县| 安仁县| 南城县| 安宁市|