Skip to content

Commit

Permalink
Merge pull request microsoft#102 from southworkscom/luisactionbinding…
Browse files Browse the repository at this point in the history
…-updates

[LUIS Action Binding] Updates
  • Loading branch information
RobStand authored Apr 4, 2017
2 parents a17a038 + f42ac5d commit 6d13bbe
Show file tree
Hide file tree
Showing 17 changed files with 8,683 additions and 24 deletions.
4,306 changes: 4,306 additions & 0 deletions CSharp/Blog-LUISActionBinding/LUIS_MODEL.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<add key="MicrosoftAppId" value="" />
<add key="MicrosoftAppPassword" value="" />

<add key="LUIS_SubscriptionKey" value="11be6373fca44ded80fbe2afa8597c18" />
<add key="LUIS_ModelId" value="86226c53-b7a6-416f-876b-226b2b5ab07b" />
<add key="LUIS_SubscriptionKey" value="YourSubscriptionKey" />
<add key="LUIS_ModelId" value="YourModelId" />
</appSettings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<appSettings>
<add key="LUIS_SubscriptionKey" value="11be6373fca44ded80fbe2afa8597c18" />
<add key="LUIS_ModelId" value="86226c53-b7a6-416f-876b-226b2b5ab07b" />
<add key="LUIS_SubscriptionKey" value="YourSubscriptionKey" />
<add key="LUIS_ModelId" value="YourModelId" />
</appSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />

<add key="LUIS_SubscriptionKey" value="11be6373fca44ded80fbe2afa8597c18" />
<add key="LUIS_ModelId" value="86226c53-b7a6-416f-876b-226b2b5ab07b" />
<add key="LUIS_SubscriptionKey" value="YourSubscriptionKey" />
<add key="LUIS_ModelId" value="YourModelId" />
</appSettings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
Expand Down
27 changes: 27 additions & 0 deletions CSharp/Blog-LUISActionBinding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,33 @@ The minimum prerequisites to run this sample are:
* The latest update of Visual Studio 2015. You can download the community version [here](http://www.visualstudio.com) for free.
* The Bot Framework Emulator. To install the Bot Framework Emulator, download it from [here](https://emulator.botframework.com/). Please refer to [this documentation article](https://github.com/microsoft/botframework-emulator/wiki/Getting-Started) to know more about the Bot Framework Emulator.

#### LUIS Application
If you want to test this sample, you have to import the pre-build [LUIS_MODEL.json](LUIS_MODEL.json) file to your LUIS account.

The first step to using LUIS is to create or import an application. Go to the home page, www.luis.ai, and log in. After creating your LUIS account you'll be able to Import an Existing Application where can you can select a local copy of the LUIS_MODEL.json file an import it.

![Import an Existing Application](images/prereqs-import.png)

Once you imported the application you'll need to "train" the model ([Training](https://www.microsoft.com/cognitive-services/en-us/LUIS-api/documentation/Train-Test)) before you can "Publish" the model in an HTTP endpoint. For more information, take a look at [Publishing a Model](https://www.microsoft.com/cognitive-services/en-us/LUIS-api/documentation/PublishApp).

Finally, edit the .config files for each sample ([Bot](LuisActions.Samples.Bot/Web.config), [Web](LuisActions.Samples.Web/Web.config), [Console](LuisActions.Samples.Console/App.config)) and update the `LUIS_SubscriptionKey` and `LUIS_ModelId` appSettings with the values corresponding to your Subscription and Application.

#### Where to find the Application ID and Subscription Key

You'll need these two values to configure the LuisDialog through the LuisModel attribute:

1. Application ID

In the LUIS application's dashboard, you can copy the App ID from the address bar.

![App Settings](images/prereqs-appid.png)

2. Subscription Key

In the [My keys page](https://www.luis.ai/home/keys), copy the Programmatic API Key.

![Programmatic API Key](images/prereqs-apikey.png)

### What is LUIS Action Binding?

There are times when you may want to link an intent to an action at client side (e.g.: in your Bot, or ASP.NET MVC, or even a console app), with an easy binding logic for it, where you can also resolve complex things in order to fulfill an user's intent. In the same way that you can define an intent at LUIS UI for your app, you can also specify requirements for this action to be triggered when bound to an intent at client side. These requirements are known as action members, and will match recognizable entities for the intent that the action maps to.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6d13bbe

Please sign in to comment.