当前位置:网站首页>Rasa dialogue robot helpdesk (III)

Rasa dialogue robot helpdesk (III)

2022-06-13 01:07:00 m0_ forty-nine million three hundred and eighty thousand four h

One 、HelpDesk Creation of intelligent dialogue robot incident Complete business process analysis

Here is about domain The document is about slot “problem_description” The definition of , You can use key “not_intent” Specify which values do not trigger slot Fill of , You can also use intent Specify trigger slot Filled with intent:

Retraining the model :

After the model training is completed, it is saved through persistence :

Use interactive dialogue mode to learn more about dialogue robot creation incident Business process . First confirm the use docker Command to start duckling service :

docker run -p 8000:8000 rasa/duckling

Display after startup :

With debug mode Rasa action server:

Run the command ”rasa interactive” Enter interactive mode :

After startup, the dialog flow visualization will be displayed URL:

Click on URL You can see the status of the current conversation :

Input information :I forgot my password

confirm intent Continue to execute after correct identification :

slot “incident_title” The value of is set to “Problem resetting password”, Run... As prompted form “open_incident_form” To collect information from users :

You can see the of the current request slot yes email, Carry on , Enter the following email Information :

The model is correctly extracted Email Information , Continue to execute after confirmation :

slot “email” The value just entered by the user has been filled , Continue to follow the prompts form, You can see from the dialogue history information ” requested_slot” The value of is priority, It indicates that the dialogue robot currently needs to collect information from the user about incident Of ” priority”:

Check the visual dialog flowchart , Dynamic updates have been made accordingly :

Carry on , According to the output of the dialogue robot button Option selection priority Value :

Here, select Create priority by low Of incident, So choose options 1:

At this time slot “priority” The value of is set to ”low”, Continue to run... As prompted form To complete the information collection , You can see from the output , The next information to be collected is ” problem_description”:

Enter the problem description :please reset my password

Confirm to continue :

At this time slot “problem_description” The information just entered has been filled in , Continue operation form Complete information collection :

“requested_slot” The value of is ”confirm”, Indicates when the incident After the information collection of , The user is required to confirm whether to submit form:

choice Yes:

Continue operation form:

You can see this form All of the slots All have been collected , Here is domain About this form The definition of , among required_slots This key Defines the information that the above dialogue robot needs to collect from users in turn :

Next, you need to invoke the microservice action_open_incident, The visual flow chart is updated as follows

Two 、 establish intent Microservice parsing for

Execute microservices action_open_incident, stay action server The log output of the client is as follows :

At this point, view the visual flow chart ,action_open_incident This step changes from dotted line to solid line , Indicates that the execution has been completed :

This is a micro service class :

Need to implement interface Action Medium name Method :

Implementation interface Action Medium run Method :

from tracker Get the information collected from the user by the previous dialogue robot slot Information :

If the user chooses to cancel creation incident, Then call the template to output the message , And you need to reset all slot Value :

In case of local mode , Build a message:

If you are calling a third party incident Management system snow Interface , You can see that you need to call the interface method create_incident To create incident, After the call is completed, return to response, According to response It is concluded that incident number, If there is a valid incident number, Then output information to prompt the user incident Create success , Otherwise, from response Remove from error Information is returned to the user .

At the end of the method , You need to reset all current slot The value of is empty , To create... For the next acceptance user incident Be prepared for your request , At the same time, it will trigger SlotSet Events to put the current email Assign the value of to another slot “previous_email”, In this way, the user does not need to input again in some scenarios email.

原网站

版权声明
本文为[m0_ forty-nine million three hundred and eighty thousand four h]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/164/202206130058270432.html