Updated on 2024-10-12 GMT+08:00

Intention/Slot Variable (TOC)

You can use a parameter for value assignment or judgment in the semantic recognition service diagram element. This parameter is valid only in the current diagram element. If you want to use it in subsequent diagram elements, define a flow variable and assign a value to it. The following table describes the flow variables.

The system directly recognizes intention slot variables as those of the character string type. Therefore, use the same type of flow variables when associating the slot variables with flow variables.

Parameter

Description

TOC.ChatBotIntentCode

Code of a matched intention in semantic recognition. The value is a character string.

The following ChatBotIntentCodes are preset in the system and can be directly used:

  • systemQA

Generally, you can obtain the value of this parameter to determine whether the correct intention is matched.

ChatBotRespContent

Reply for the intention matched in semantic recognition, including the reply configured in the slot and response.

TOC.ChatBotScenarioName

Name of the intention that is matched after the semantic recognition is executed. The value is a character string.

For example, you can set TOC.ChatBotScenarioName to Seat Type in the following scenario.

TOC.ChatBotSlot name

This parameter is the slot parameter set in the intention. The value is a character string. You can use the intention to view the slot parameters of the intention.

Choose Configuration Center > Chatbot Management > Semantic Understanding > Knowledge Management > Intention Management, select a domain from the first drop-down list, click the name link, and then click the Slot tab to view the slot variable names in the Name column.

For example, to obtain the slot value in the following intention, you can set it as follows:

TOC.ChatBotsitType = "Suite"

TOC.ChatBotResponse

This parameter returns all the content in the recognition interface. An example structure is as follows: {"intents":[{"simQuestions":[],"scenarioType":"normal","scenarioStatus":"finish","confidence":1.0,"responses":["Balance"] ,"priority":0,"params":{},"scenarioName": "Call fee query 2","commands":["21312","TEXT"]}],"statusCode":200}

To obtain similar questions, use TOC.ChatBotResponse.intents[0].simQuestions.