Skip to content

Commit

Permalink
Final touches, Data updates, Read Me update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazem El-Hammamy committed May 5, 2019
1 parent 71edd7a commit bed00e1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 45 deletions.
12 changes: 10 additions & 2 deletions Helpers/LuisService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,23 @@ namespace BasicBot

public class LuisServiceV3
{
public string url { get; set; }

public static HashSet<string> Coreferences = new HashSet<string>() { "they", "we", "them", "their" };
public string subscriptionKey { get; set; }

public static string url = "https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/e011cee6-32a2-43df-bfcc-1979d87fd506/slots/PRODUCTION/predict?log=true&subscription-key=014fee3605e84fdc9d772b8092a7e7f4&multiple-intents=true";
public string appId { get; set; }

public string slot { get; set; }
public LuisServiceV3()
{
subscriptionKey = "014fee3605e84fdc9d772b8092a7e7f4";
appId = "e011cee6-32a2-43df-bfcc-1979d87fd506";
slot = "PRODUCTION";
url = $"https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/slots/{slot}/predict?subscription-key={subscriptionKey}&multiple-intents=true&log=true";
}

public static HashSet<string> Coreferences = new HashSet<string>() { "they", "we", "them", "their" };

// Call endpoint to get prediction
public async Task<List<LuisResponse>> PredictLUIS(string query, ITurnContext turnContext)
{
Expand Down
50 changes: 9 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
# Basic Bot template
This bot has been created using [Microsoft Bot Framework](https://dev.botframework.com),
- Use [LUIS](https://luis.ai) to implement core AI capabilities
- Implement a multi-turn conversation using Dialogs
- Handle user interruptions for such things as Help or Cancel
- Prompt for and validate requests for information from the user

# Prerequisite to run this bot locally
- Download the bot code from the Build blade in the Azure Portal
- Update the `appsettings.json` file in the root of the bot project with the botFilePath and botFileSecret
- You can find the botFilePath and botFileSecret in the Azure App Service application settings.

Your appsettings.json file should look like this
```bash
{
"botFilePath": "<copy value from App settings>",
"botFileSecret": "<copy value from App settings>"
}
```

# LUIS_QnA_LaLiga
Welcome to the La Liga Bot Demo!
To run the demo locally:

## Run in Visual Studio
- Open the .sln file with Visual Studio.
Expand All @@ -35,26 +18,13 @@ their bots on localhost or running remotely through a tunnel.
- File -> Open bot and navigate to the bot project folder
- Select `<your-bot-name>.bot` file

# Deploy this bot to Azure
## Publish from Visual Studio
- Open the .PublishSettings file you find in the PostDeployScripts folder
- Copy the userPWD value
- Right click on the Project and click on "Publish..."
- Paste the password you just copied and publish

## Publish using the CLI tools
You can use the [MSBot](https://github.com/microsoft/botbuilder-tools) Bot Builder CLI tool to clone and configure any services this sample depends on.
To install all Bot Builder tools -

Ensure you have [Node.js](https://nodejs.org/) version 8.5 or higher
# Basic Bot template
This bot has been created using [Microsoft Bot Framework](https://dev.botframework.com),
- Use [LUIS](https://luis.ai) to implement core AI capabilities
- Implement a multi-turn conversation using Dialogs
- Handle user interruptions for such things as Help or Cancel
- Prompt for and validate requests for information from the user

```bash
npm i -g msbot chatdown ludown qnamaker luis-apis botdispatch luisgen
```
To clone this bot, run
```
msbot clone services -f deploymentScripts/msbotClone -n <BOT-NAME> -l <Azure-location> --subscriptionId <Azure-subscription-id>
```
# Further reading
- [Bot Framework Documentation](https://docs.botframework.com)
- [Bot basics](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0)
Expand All @@ -65,5 +35,3 @@ msbot clone services -f deploymentScripts/msbotClone -n <BOT-NAME> -l <Azure-loc
- [Channels and Bot Connector Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-concepts?view=azure-bot-service-4.0)
- [QnA Maker](https://qnamaker.ai)

# LUIS_QnA_LaLiga
# LUIS_QnA_LaLiga
2 changes: 1 addition & 1 deletion Resources/LaLigaData.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/LaLigaRest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"HomeTeam":"Sevilla","Date":"2019-05-03","AwayTeam":"Vallecano"},{"HomeTeam":"Sociedad","Date":"2019-05-04","AwayTeam":"Villareal"},{"HomeTeam":"Getafe","Date":"2019-05-03","AwayTeam":"Real Madrid"},{"HomeTeam":"Sevilla","Date":"2019-05-03","AwayTeam":"Leganes"},{"HomeTeam":"Levante","Date":"2019-05-04","AwayTeam":"Vallecano"},{"HomeTeam":"Espanyol","Date":"2019-05-03","AwayTeam":"Ath Madrid"},{"HomeTeam":"Alaves","Date":"2019-05-04","AwayTeam":"Sociedad"},{"HomeTeam":"Celta","Date":"2019-05-03","AwayTeam":"Barcelona"},{"HomeTeam":"Getafe","Date":"2019-05-04","AwayTeam":"Girona"},{"HomeTeam":"Eibar","Date":"2019-05-05","AwayTeam":"Betis"},{"HomeTeam":"Real Madrid","Date":"2019-05-05","AwayTeam":"Villareal"},{"HomeTeam":"Valladolid","Date":"2019-05-05","AwayTeam":"Ath Bilbao"},{"HomeTeam":"Huesca","Date":"2019-05-05","AwayTeam":"Valencia"},{"HomeTeam":"Barcelona","Date":"2019-05-12","AwayTeam":"Getafe"},{"HomeTeam":"Girona","Date":"2019-05-12","AwayTeam":"Levante"},{"HomeTeam":"Valencia","Date":"2019-05-12","AwayTeam":"Alaves"},{"HomeTeam":"Vallecano","Date":"2019-05-12","AwayTeam":"Valladolid"},{"HomeTeam":"Sociedad","Date":"2019-05-12","AwayTeam":"Real Madrid"},{"HomeTeam":"Ath Madrid","Date":"2019-05-12","AwayTeam":"Sevilla"},{"HomeTeam":"Leganes","Date":"2019-05-12","AwayTeam":"Espanyol"},{"HomeTeam":"Betis","Date":"2019-05-12","AwayTeam":"Huesca"},{"HomeTeam":"Ath Bilbao","Date":"2019-05-12","AwayTeam":"Celta"},{"HomeTeam":"Valladolid","Date":"2019-05-19","AwayTeam":"Valencia"},{"HomeTeam":"Eibar","Date":"2019-05-19","AwayTeam":"Barcelona"},{"HomeTeam":"Levante","Date":"2019-05-19","AwayTeam":"Ath Madrid"},{"HomeTeam":"Alaves","Date":"2019-05-19","AwayTeam":"Girona"},{"HomeTeam":"Huesca","Date":"2019-05-19","AwayTeam":"Leganes"},{"HomeTeam":"Getafe","Date":"2019-05-19","AwayTeam":"Villareal"},{"HomeTeam":"Real Madrid","Date":"2019-05-19","AwayTeam":"Betis"},{"HomeTeam":"Sevilla","Date":"2019-05-19","AwayTeam":"Ath Bilbao"},{"HomeTeam":"Espanyol","Date":"2019-05-19","AwayTeam":"Sociedad"},{"HomeTeam":"Celta","Date":"2019-05-19","AwayTeam":"Vallecano"},{"HomeTeam":"Villareal","Date":"2019-05-12","AwayTeam":"Eibar"}]
[{"HomeTeam":"Barcelona","Date":"2019-05-12","AwayTeam":"Getafe"},{"HomeTeam":"Girona","Date":"2019-05-12","AwayTeam":"Levante"},{"HomeTeam":"Valencia","Date":"2019-05-12","AwayTeam":"Alaves"},{"HomeTeam":"Vallecano","Date":"2019-05-12","AwayTeam":"Valladolid"},{"HomeTeam":"Sociedad","Date":"2019-05-12","AwayTeam":"Real Madrid"},{"HomeTeam":"Ath Madrid","Date":"2019-05-12","AwayTeam":"Sevilla"},{"HomeTeam":"Leganes","Date":"2019-05-12","AwayTeam":"Espanyol"},{"HomeTeam":"Betis","Date":"2019-05-12","AwayTeam":"Huesca"},{"HomeTeam":"Ath Bilbao","Date":"2019-05-12","AwayTeam":"Celta"},{"HomeTeam":"Valladolid","Date":"2019-05-19","AwayTeam":"Valencia"},{"HomeTeam":"Eibar","Date":"2019-05-19","AwayTeam":"Barcelona"},{"HomeTeam":"Levante","Date":"2019-05-19","AwayTeam":"Ath Madrid"},{"HomeTeam":"Alaves","Date":"2019-05-19","AwayTeam":"Girona"},{"HomeTeam":"Huesca","Date":"2019-05-19","AwayTeam":"Leganes"},{"HomeTeam":"Getafe","Date":"2019-05-19","AwayTeam":"Villareal"},{"HomeTeam":"Real Madrid","Date":"2019-05-19","AwayTeam":"Betis"},{"HomeTeam":"Sevilla","Date":"2019-05-19","AwayTeam":"Ath Bilbao"},{"HomeTeam":"Espanyol","Date":"2019-05-19","AwayTeam":"Sociedad"},{"HomeTeam":"Celta","Date":"2019-05-19","AwayTeam":"Vallecano"},{"HomeTeam":"Villareal","Date":"2019-05-12","AwayTeam":"Eibar"}]

0 comments on commit bed00e1

Please sign in to comment.