$caila.simpleInference
Classifies the text without any additional parameters.
Syntax
The method accepts the text for parsing in the string
argument:
$caila.simpleInference("hello")
A JSON object with the phrase classification result is returned in response.
Let us define the hello
intent with the following training phrases: hello, hi. The classification result for the hello
phrase is:
{
"intent":{
"id":12174, // intent id
"path":"/hello", // the path to the intent
"slots":[
]
},
"confidence":1, // confidence level
"slots":[ // slots
]
}
tip
You can also use the custom
clientId
identifier as a method argument. Specify the clientId
identifier as the last argument. When $caila.simpleInference()
is executed, entities will be recognized for the specified client.How to use
state:
q!: simpleInference
script:
$reactions.answer(JSON.stringify($caila.simpleInference("hello")));