A solution for chatbot constructors to identify problems in flow structure.
Project description
Blip Flow Analysis
Blip Flow Analysis provides a solution for chatbot constructors to identify problems in flow structure that can be originated from bad structuring or poor organization.
Installation
Use pip to install:
pip install blip_flowanalysis
Usage
Missing Trackings analysis
Using the MissingTrackigns
analyser:
import blip_flowanalysis as bfa
# replace __chatbot_as_json__ parameter by your json bot
bot_flow = bfa.Flow(__chatbot_as_json__)
analyser = bfa.MissingTrackings(minimum=1)
# return `True` if amount of Trackings is above minimum, `False` otherwise
print(analyser.analyse(bot_flow))
Process HTTP Return Validation analysis
Two types of validation are performed for each HTTP request in the chatbot flow:
- Next action validation: check if request is validated by the action immediately after it.
- Outputs validation: check if the request is validated by the outputs of the request's state.
The HTTP request validation process has three possible outcomes:
- status validation: validation found using the request's status variable (best practice);
- body validation: validation found using the request's body variable (warning);
- no validation: validation wasn't found using either status or body variable (warning).
Using the ProcessHTTPReturnValidation
analyser:
import blip_flowanalysis as bfa
# replace __chatbot_as_json__ parameter by your json bot
bot_flow = bfa.Flow(__chatbot_as_json__)
http_analyser = bfa.ProcessHTTPReturnValidation()
# return validation report with "summary" and "warnings"
validation_report = http_analyser.analyse(bot_flow)
print(validation_report)
The structure of the validation report is presented bellow.
{
"summary":
{
"total": number of HTTP requests found,
"status validation": number of requests with validation of status variable,
"body validation": number of requests with validation of body variable,
"no validation": number of requests without validation of either status or body variable
},
"warnings":
[
{
"state id": state id in which the request action is located,
"action type": either "inputActions" or "outputActions",
"status variable": status variable name,
"body variable": body variable name,
"validation": either "body validation" or "no validation"
}
]
}
Author
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for blip_flowanalysis-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c02295e48d8c73f3d7337498c9f17195d0107819d89b65b12a3307b422257354 |
|
MD5 | 42ddaedf6619e42988cf410a36e1679e |
|
BLAKE2b-256 | 78bb521716f609f95224a1aeac0945b48ffa51f02dbc9c0cba7fe0bbab23fe0e |