J‑Graph compatibility with Tovie DSL
Basic J‑Graph concepts such as states, themes, and blocks, all correspond to constructs of Tovie DSL — the language used for Tovie Platform bot script development.
J‑Graph and Tovie DSL compatibility allows for efficient collaboration between different team members involved in developing conversational AI solutions:
- Conversational UI designers can design a script prototype in the visual editor before passing it on to the development team.
- Developers tasked with this project won’t be starting from scratch: J‑Graph has already generated a large portion of the code for them.
States
In Tovie DSL, states correspond to the state
tag. State groups correspond to nested states.
For example, the following script fragment opened in J‑Graph corresponds to the following code structure:
![State group](/assets/images/group-inside-view-6d624fc34b27cc8550a950f3de4a3549.png)
theme: /
state: Symptoms
state: Positive
# ...
state: Negative
# ...
state: Unrecognized
# ...
Themes
Themes in J‑Graph correspond to the theme
tag.
Root theme corresponds to the /
theme.
If you create a new theme in J‑Graph, a .sc
file with the theme name will be added to the src/themes
directory.
The theme will be declared in this file.
The file will be automatically connected to the main file of the script using require
.
When you delete a theme in J‑Graph:
- The theme and its states will be deleted from all project files.
- If a file contains only this theme, the file will be deleted.
Blocks
All blocks in J‑Graph correspond to Tovie DSL tags, and their settings correspond to tag parameters. Refer to the documentation on the relevant tag to better understand how any given block works.
User phrases and events
J‑Graph | Tovie DSL |
---|---|
User phrase (intent) block | intent tag |
Event block | event tag |
Pattern block | q tag |
Go to state field (for events and patterns) The bot should go… field (for intents) | toState parameter |
Ignore transitions from nested states checkbox | onlyThisState parameter |
Triggers
J‑Graph | Tovie DSL |
---|---|
User phrase (intent) block | intent or intent! tag |
Event block | event or event! tag |
Pattern block | q or q! tag |
Global trigger checkbox | If enabled, the global tag is used |
Expect trigger from state field | fromState parameter |
Ignore triggers from nested states checkbox | onlyThisState parameter |
Reactions
J‑Graph block | Tovie DSL tag |
---|---|
Text | a |
Image | image |
Audio | audio |
Condition | if elseif else |
Random answer | random |
Button group | buttons inlineButtons (if the button press reaction is Go to link) |
Transition | go (if the transition is deferred) go! (if the transition is immediate) |
Code | script |
Actions
J‑Graph block | Tovie DSL tag |
---|---|
End session | EndSession |
HTTP request | HttpRequest |
Request confirmation | Confirmation |
Request file | InputFile |
Request number | InputNumber |
Request text | InputText |
Send email | Email |
Send SMS | Sms |
Telegram payment | TelegramPayment |
Transfer call to agent | TransferCallToOperator |
Transfer chat to agent | TransferToOperator |