Python ChatTrees are defined in code. Although you can use the ">>" operator to define edges between nodes, it is not intuitive enough to view the overall topology. Therefore, we provide a function that can render the Python ChatTree into an HTML interactive graph to intuitively view the overall topology and the code definition information of each node.
In the TeliChatSecRun directory (if there is a Python virtual environment, it needs to be activated first), execute python ./ichatdef/firstapp/py_chattree/PythonChatTree.py to generate "PythonChatTree.html" (replace "PythonChatTree" with the real ChatTree file name during actual execution), download it locally and open it with a browser, you can see the topology of the entire ChatTree and related code information. For details, please refer to the HTML interaction diagram of the 911 Python ChatTree on the homepage and it can be downloaded locally and opened with a browser for browsing, or you can install the Live Preview (Microsoft) plug-in in VS Code and preview the html file
How to use the HTML interaction graph:
Press and hold the left mouse button in the blank space to drag and pan the entire interactive diagram
Scroll the mouse wheel to zoom the interaction graph
Hovering the mouse over a node will display the code definition information of the node
Use Ctrl+F to find related information (nodes)
In the Python ChatTree, each type of node has an attribute "memo". The attribute value type is str. The memo information will be displayed next to the corresponding node in the HTML interaction diagram.