Skip to main content
Version: 2.0.0

Compute Block

This chapter will explain the role of compute block and how to use it.

Basic Concept

In some cases, the data the agent collects from the user needs to be processed again before it can be used. At this time, we can use the compute block to achieve such requirements.

Clean mode

One or more slots can be associated with this block, and these slots will be emptied when the dialogue flow progresses to this block. For example, in some business scenarios, we often need to confirm to the user whether the information is correct. If it is incorrect, we need to collect the information again. In this case, the clean mode is very suitable. clean-mode-en-v1.9

Set mode

Associate a slot for this block, and then fill in what value needs to be assigned to this slot in the blank below. This value can be:

  1. Text
  2. Other slot values
  3. Metadata values or attribute values
  4. Splicing results of the above two values

When assigning the values of other slots to the associated slots, the format is {slot=slot name}; When assigning values in the form of splicing, the format is {slot=slot name} text. For example, the assignment is made in the form of splicing and the format is set {slot=total} million. If the value of total is "10", then when the dialogue flow passes through this block, "10 million" will be filled into the associated slot. set-mode-en-v1.9


In clean mode, the default route can be directly configured. clean-mode-routes-en-v1.9

In set mode, a new branch route can be added according to the value finally filled in the slot. If there are multiple branch routes, they will be executed according to the priority from top to bottom. The default value route and empty value route can also be configured. route