Code File
-
Code files are only required for ChatTree created based on Xmind
- Code files are Python files used to define and store various (global) functions that need to be called in the CHatTree. After definition, the file needs to be uploaded through the backend management UI
- Do not define global variables in code files
- Other Python packages or files can be imported into the code file (you may need to use sys.path.append() to add the path of the Python package or file. If it is a relative path, it is relative to the TeliChatSecRun directory)
- The above (global) functions defined or imported in code files can be called in several nodes of the Xmind ChatTree (for details, see "Python Script/Function")
-
ChatTree created based on Python do not require code files, because in the Python file that creates the ChatTree, you can arbitrarily define various functions needed in the CHatTree, or import functions in other Python modules, or even directly define lambda expressions where function variables are needed