当前位置:网站首页>Rasa dialogue robot helpdesk (V)
Rasa dialogue robot helpdesk (V)
2022-06-29 01:15:00 【m0_ forty-nine million three hundred and eighty thousand four h】
One 、HelpDesk Analysis of verification function in business process of intelligent dialogue robot
stay HelpDesk When an intelligent dialogue robot runs a business process , The information entered by the user needs to be verified , The background microservice can only be called after the verification is passed , If the validation fails , Dialogue robots can continue to let users provide correct information , Do not submit until all the information to be collected has been verified form. Pass below Rasa Provided interactive Mode demonstrates how a dialogue robot verifies user input information . When the user queries the created incident When , Enter the following information :

NLU The model correctly identifies the user's intention , Carry on :

Continue to follow the prompts to run this form:

At this time, the dialogue robot asks the user to provide email Information , Input 123:

NLU The model identifies the user's intention as out_of_scope, And the prompt cannot be extracted email, there NLU Model means NLU pipeline The... Used in the configuration file duckling, Input information 123 Obviously not in line with email Format , therefore duckling Unable to extract email.
If you enter the following information , Even if it is not an effective email Address :

At this time, it seems that the model can extract this email Information , Carry on :

Slot “email” The value just entered has been filled in , see action server Output log for :

You can see Rasa action server received Rasa server Authentication request sent , Then the validation micro service is successfully executed validate_incident_status_form, We are domain You can see that the following two validations are configured action:

As mentioned earlier HelpDesk The main business process of the dialogue robot includes creating according to user input incident And queries that have been created incident The state of , In these two processes, we will use open_incident_form and incident_status_form To collect user information , So for each form Will define a validate action To verify that each form Whether the information to be collected meets the requirements .
Two 、HelpDesk Dialogue robot business process validation microservice code parsing
- establish incident Validate microservices
The following is the micro service class , Inherited from Rasa SDK Of form Validate framework classes FormValidationAction

stay name Method needs to return in domain Defined in the configuration action name:

Here is form The definition of :

In the validation micro service, you can collect data according to the above definition slots The information provides corresponding verification methods , Only two important are provided here slot Information verification method .

This method calls the internal method _validate_email Execute specific validation logic :

First, check the passed in parameter values :

According to the user provided email From a third party incident Get the identity of the current user in the management system id:

- If caller_id If it is valid, it returns caller_id and email
- If you cannot return a single caller_id, shows email Invalid , At this point, it is necessary to slot The value of the set None
- If an error message appears , Also need to put slot The value of the set None:

The following method verifies priority Whether it works :

If priority Valid returns the value , Otherwise, you need to slot The value of the set None, And call the template method utter_no_priority Output information to users :

2. Inquire about incident Status verification microservice
The following is the micro service class , Inherited from Rasa SDK Of form Validate framework classes FormValidationAction, According to the naming convention , The name of the microservice class should be prefixed with ”Validate”:

stay name Method needs to return in domain Defined in the configuration action name:

Here is form The definition of :

This form Just collect email Information , So there is only one verification method :

It's actually calling the same internal method _validate_email To achieve email Verification logic of .
边栏推荐
- To the interface problems we have encountered
- 基于.NetCore开发博客项目 StarBlog - (13) 加入友情链接功能
- 广度度优先搜索实现抓牛问题
- [MCU club] design of GSM version of range hood based on MCU [simulation design]
- 【UVM】我的 main_phase 都跑完了,为啥 case 无法退出?太不讲道理!
- QT基于RFID管理系统(可应用于大多数RFID管理系统)
- 盘点 6 月 yyds 的开源项目!
- [js practice every m days] JS export object analysis based on libcef application (steam)
- 分析框架——用户体验度量数据体系搭建
- 【RRT三维路径规划】基于matlab快速扩展随机树无人机三维路径规划【含Matlab源码 1914期】
猜你喜欢

IT治理方面的七个错误,以及如何避免

独家分析 | 关于简历和面试

学习通否认 QQ 号被盗与其有关:已报案;iPhone 14 量产工作就绪:四款齐发;简洁优雅的软件早已是明日黄花|极客头条

测试只能干到35岁?35岁+的测试就会失业?

EasyCVR服务private.pem文件被清空,导致无法正常启动该如何处理?

Code repetition of reinforcement learning based parameters adaptation method for particlewarn optimization

Learning notes of Lichuang EDA: Copper laying dead zone? isolated island? Dead copper?

How to solve the problem of Caton screen when easycvr plays video?

Rasa对话机器人之HelpDesk (五)

接雨水系列问题
随机推荐
sqlalchemy的基本使用
不同的子序列问题I
广度度优先搜索实现抓牛问题
EasyCVR服务private.pem文件被清空,导致无法正常启动该如何处理?
Count the number of different palindrome subsequences in the string
Do280 allocating persistent storage
How to select database
[Fire Detection] forest fire detection system based on Matlab GUI (with panel) [including Matlab source code phase 1921]
流媒体集群应用与配置:如何在一台服务器部署多个EasyCVR?
Uvm:field automation mechanism
QT is based on RFID Management System (applicable to most RFID Management Systems)
What is the difference between immunohistochemistry and immunohistochemistry?
深度优先搜索实现抓牛问题
学习通否认 QQ 号被盗与其有关:已报案;iPhone 14 量产工作就绪:四款齐发;简洁优雅的软件早已是明日黄花|极客头条
GUI Graphical user interface programming example - color selection box
多维分析预汇总应该怎样做才管用?
第八天 脚本与音频
QT基于RFID管理系统(可应用于大多数RFID管理系统)
Sword finger offer 16 Integer power of numeric value
Esmm reading notes