Type: NLP Worker
A Luis worker takes user input and sends it to Luis for natural language processing. A Luis worker can be created through the CLI, or through portal.
The following contains useful documentation on getting started with a new Luis Application, which will be needed in the next sections https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-get-started-create-app
Assuming you have setup a Luis Application, you can find the required information for creating a luis worker within the Luis portal by following these steps:
Once you have the information from the Creating a Luis Application, you can derive the details which will be required for creating a Luis Worker:
Secret: The secret will contain both the Authoring Key and Prediction Key that will be used to communicate with Luis. This is the Prediction Key and Authoring Key mentioned in the previous section. See Creating a Luis Secret for more information on creating the secret.
AppId (Optional): The identifier of the particular Luis application you wish to use for intent detection.
The App Id is an optional field for the worker, if you do not provide an App Id, the first time you publish a ServisBOT bot, ServisBOT will generate a Luis application for you and update your worker configuration with the new App Id and use this App Id for future communication with Luis. The application ServisBOT generates for you will be namespaced by your organization and bot. For example if your organization name is ‘myorg’ and your bot name is ‘botty’. In Luis you will see an application called ‘myorg-botty’.
If you do provide the App Id, ServisBOT will import and update intents using the App Id you have provided.
Region: This is the region the Luis Application is based in.
NluConfidenceThresholdOverride [Optional] You can use this as an override of the returned detected intent confidence. If this value is higher than that returned from the nlu provider it will change the response to be a fallback, this value defaults to 0.
You can now create a secret using your Luis Authoring Key, and a luis worker using the cli or portal, using information gathered above.
Save this json to a file and create a worker using the cli command sb-cli worker create file.json
{
"Data": {
"NluConfiguration": {
"AppId": "AppId",
"Region": "westus",
"Secret": "SRN:::HERE",
"NluConfidenceThresholdOverride": 0.8
},
"NluType": "Luis"
},
"Organization": "ORGANIZATION",
"Config": {
"Avatar": "default-bot"
},
"Enabled": true,
"Updated": 1608652074324,
"Description": "A Luis worker",
"Id": "4685b16c-a305-4b0c-b33d-8ae12b81ff9a",
"Type": "nlp-worker",
"Name": "LuisWorker",
"Created": 1608652074324,
"Status": "published",
"Srn": "srn:botnet:REGION:ORGANIZATION:worker:4685b16c-a305-4b0c-b33d-8ae12b81ff9a"
}
Once you have created the worker using the CLI, it will return an ID for you. You need to then update/create a bot and place the worker at the top with the id and the type of nlp-worker.
You can create a luis worker using portal by navigating to your bot, and clicking on the resources tab.