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

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
主站蜘蛛池模板: 泰州市| 华容县| 洛南县| 金乡县| 普宁市| 宜川县| 商水县| 东台市| 保德县| 噶尔县| 拜泉县| 南木林县| 海宁市| 铁岭市| 海晏县| 尼木县| 来凤县| 攀枝花市| 博兴县| 明溪县| 尼玛县| 黄大仙区| 平顶山市| 永胜县| 喀喇| 南通市| 玉山县| 甘孜县| 温泉县| 辽阳市| 肇源县| 海安县| 文安县| 专栏| 宜春市| 闸北区| 兴隆县| 高淳县| 宽城| 惠来县| 乌拉特前旗|