Search⌘ K
AI Features

LUIS App Using SDK - Training, Publishing and Consuming the Model

Explore how to use the LUIS SDK to train, publish, and consume a conversational AI model. Learn key steps in preparing your LUIS app for real-world applications, including managing training status, publishing to production, and handling user queries.

In the previous lesson we created a LUIS app, added the intent and entity, and added the utterances to the intent. Now let’s move on to training.

Training the LUIS app

The next step is to train the LUIS app. We’ll train the LUIS app by calling the train_version() method using the luis_client object that we created in the previous lesson.

C++
luis_client.train.train_version(luis_app_id, version_id)
training_not_completed = True
while training_not_completed:
training_info = luis_client.train.get_status(luis_app_id, version_id)
for i in range(len(training_info)):
if training_info[i].details.status == "Queued" or training_info[i].details.status == "InProgress":
print("Waiting for 1 second for the training to get completed!")
time.sleep(1)
else:
print("LUIS app is trained successfully!")
training_not_completed = False
break

Explanation:

  • In line 1, we call the train_version() method and pass the app ID and the version ID to the function to start the training. This can be verified ...