Bot project structure
File structure
Main components of a chatbot project: source code with the conversation logic, automated tests and the configuration file. These components are usually separated: the source code is stored in the src folder, and tests are stored in the test folder. The configuration file must have the name chatbot.yaml and must reside in the project’s root folder.
Therefore, a minimum chatbot project contains:
- The
chatbot.yamlfile that contains the project descriptor and is located in the project’s root folder. - The
srcfolder where themain.scfile is located with the chatbot’s main script. This folder may also contain files with additional scripts,.csvdictionaries and.jsscripts. - The
testfolder with the.xmltests for the chatbot operation script.
Project files
| File | Description |
|---|---|
chatbot.yaml | Configuration file of the chatbot. It contains the name of the script main file, information about linked modules, configuration of the NLU module, list of tests and other configuration data. |
.sc | Script files. These are the main files that define the conversation logic. |
.js | JS library files. Contain JS code that can be used in script files. May contain functions, query processing logic, calls to external systems, etc. |
.csv | Named entity dictionaries. These are required for bulk processing of city or country names, personal names, etc. in patterns. |
.yaml | Dictionaries of responses and other parameters to be used in scripts. |
.xml | Test files. Automatic tests that are executed at chatbot deployment time. |
descriptor.json | Path of the main configuration file chatbot.yaml. Used for project import/export. |
.jgraph/jgraph.visuals | Script visualization settings used by the J‑Graph visual editor. |