How to query the prediction runtime with user text
Članak
Važno
LUIS will be retired on October 1st 2025 and starting April 1st 2023 you will not be able to create new LUIS resources. We recommend migrating your LUIS applications to conversational language understanding to benefit from continued product support and multilingual capabilities.
To understand what a LUIS prediction endpoint returns, view a prediction result in a web browser.
Prerequisites
In order to query a public app, you need:
Your Language Understanding (LUIS) resource information:
Prediction key - which can be obtained from LUIS Portal. If you do not already have a subscription to create a key, you can register for a free account.
Prediction endpoint subdomain - the subdomain is also the name of your LUIS resource.
A LUIS app ID - use the public IoT app ID of df67dcdb-c37d-46af-88e1-8b97951ca1c2. The user query used in the quickstart code is specific to that app. This app should work with any prediction resource other than the Europe or Australia regions, since it uses "westus" as the authoring region.
Use the browser to see predictions
Open a web browser.
Use the complete URLs below, replacing YOUR-KEY with your own LUIS Prediction key. The requests are GET requests and include the authorization, with your LUIS Prediction key, as a query string parameter.
The format of the V3 URL for a GET endpoint (by slots) request is:
https://YOUR-LUIS-ENDPOINT-SUBDOMAIN.api.cognitive.microsoft.com/luis/prediction/v3.0/apps/df67dcdb-c37d-46af-88e1-8b97951ca1c2/slots/production/predict?query=turn on all lights&subscription-key=YOUR-LUIS-PREDICTION-KEY
The format of the V2 URL for a GET endpoint request is:
https://YOUR-LUIS-ENDPOINT-SUBDOMAIN.api.cognitive.microsoft.com/luis/v2.0/apps/df67dcdb-c37d-46af-88e1-8b97951ca1c2?subscription-key=YOUR-LUIS-PREDICTION-KEY&q=turn on all lights
Paste the URL into a browser window and press Enter. The browser displays a JSON result that indicates that LUIS detects the HomeAutomation.TurnOn intent as the top intent and the HomeAutomation.Operation entity with the value on.
Add show-all-intents=true to the end of the querystring to show all intents, and verbose=true to return all detailed information for entities.
https://YOUR-LUIS-ENDPOINT-SUBDOMAIN.api.cognitive.microsoft.com/luis/prediction/v3.0/apps/df67dcdb-c37d-46af-88e1-8b97951ca1c2/slots/production/predict?query=turn on all lights&subscription-key=YOUR-LUIS-PREDICTION-KEY&show-all-intents=true&verbose=true
Add verbose=true to the end of the querystring to show all intents:
https://YOUR-LUIS-ENDPOINT-SUBDOMAIN.api.cognitive.microsoft.com/luis/v2.0/apps/df67dcdb-c37d-46af-88e1-8b97951ca1c2?q=turn on all lights&subscription-key=YOUR-LUIS-PREDICTION-KEY&verbose=true
Pridružite se seriji susreta kako biste s kolegama programerima i stručnjacima izgradili skalabilna rješenja umjetne inteligencije temeljena na stvarnim slučajevima upotrebe.
Versions allow you to build and publish different models. A good practice is to clone the current active model to a different version of the app before making changes to the model.
Prebuilt models provide domains, intents, utterances, and entities. You can start your app with a prebuilt domain or add a relevant domain to your app later.
SDKs, REST APIs, CLI, help you develop Language Understanding (LUIS) apps in your programming language. Manage your Azure resources and LUIS predictions.