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

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
主站蜘蛛池模板: 荃湾区| 达尔| 潜山县| 内丘县| 和田市| 宝坻区| 东辽县| 黄山市| 兰坪| 策勒县| 南阳市| 乌拉特前旗| 明水县| 肇州县| 南投县| 柯坪县| 崇义县| 广水市| 宝应县| 阳山县| 镶黄旗| 松潘县| 溧水县| 武鸣县| 鄯善县| 嘉善县| 太康县| 大名县| 和龙市| 抚宁县| 宜城市| 曲靖市| 墨竹工卡县| 法库县| 淅川县| 高要市| 济阳县| 万载县| 齐齐哈尔市| 梨树县| 邮箱|