Skip to content

Commit

Permalink
Merge branch 'master' into feature/southworks/documentation/fix-ambig…
Browse files Browse the repository at this point in the history
…uities
  • Loading branch information
Batta32 committed Oct 16, 2020
2 parents e1a35b7 + e6b4351 commit 19b19cb
Show file tree
Hide file tree
Showing 32 changed files with 297 additions and 48 deletions.
17 changes: 11 additions & 6 deletions docs/_docs/skills/handbook/add-skills-to-a-virtual-assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ toc: true
```shell
npm install -g botdispatch @microsoft/botframework-cli
```
- [.NET Core runtime](https://dotnet.microsoft.com/download/dotnet-core/2.1#runtime-2.1.0): ^2.1.0

## Adding Skills

Expand Down Expand Up @@ -47,11 +48,12 @@ See the [Skills Overview]({{site.baseurl}}/overview/skills) section for details
Run the following command to add each Skill to your Virtual Assistant. This assumes you are running the CLI within the project directory and have created your Bot through the template and therefore have a `appsettings.json` file present in the working folder.

```bash
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs --luisFolder "<PATH_TO_LU_FOLDER>"
```

The `--luisFolder` parameter can be used to point the Skill CLI at the source LU files for trigger utterances. For Skills provided within this repo these can be found in the `Deployment/Resources/LU` folder of each Skill. The CLI will automatically traverse locale folder hierarchies. This can be omitted for any of the skills we provide as the LU files are provided locally. Also, you have to specify the `--cs` (for C#) or `--ts` (for TypeScript) argument for determining the coding language of your assistant, since each language takes different folder structures that need to be taken into consideration.
The `--luisFolder` parameter can be used to point the Skill CLI at the source LU files for trigger utterances (defaults to `deployment/resources/skills/` inside your assistant folder). The CLI will automatically traverse locale folder hierarchies. Also, you have to specify the `--cs` (for C#) or `--ts` (for TypeScript) argument for determining the coding language of your assistant, since each language takes different folder structures that need to be taken into consideration.

> Note: The Skills can be found in the [botframework-skills](https://github.com/microsoft/botframework-skills) repository.

Once the connect command finish successfully, you can see under the `botFrameworkSkills` property of your Virtual Assistant's appsettings.json file that the following structure was added with the information provided in the Skill manifest.
Expand All @@ -74,11 +76,12 @@ If a Skill requires Authentication connections to Office/Office 365 this is comp
## Remove a Skill from your Virtual Assistant
To disconnect a skill from your Virtual Assistant use the following command, passing the id of the Skill as per the manifest (e.g. calendarSkill). You can use the `botskills list` to view the registered skills.
To disconnect a skill from your Virtual Assistant use the following command, passing the id of the Skill as per the manifest (e.g. calendarSkill). Also, you have to specify the `--cs` (for C#) or `--ts` (for TypeScript) argument for determining the coding language of your assistant, since each language takes different folder structures that need to be taken into consideration. You can use the `botskills list` to view the registered skills.
```bash
botskills disconnect --skillId SKILL_ID
botskills disconnect --skillId <YOUR_SKILL_ID> --cs
```
*Bear in mind that the skillId parameter is case sensitive*
> Note: The id of the Skill can also be aquired using the `botskills list` command. You can check the [Skill CLI documentation]({{site.baseurl}}/skills/handbook/botskills) on this command.
Expand All @@ -89,10 +92,12 @@ To update a Skill to your assistant/Bot we provide a `botskills` command line to
Run the following command to update a Skill to your Virtual Assistant. This assumes you are running the CLI within the project directory and have created your Bot through the template and therefore have a `appsettings.json` file present in the working folder.
```bash
botskills update --remoteManifest "{{site.data.urls.SkillManifest}}" --cs
botskills update --remoteManifest "{{site.data.urls.SkillManifest}}" --cs --luisFolder "<PATH_TO_LU_FOLDER>"
```
The `--luisFolder` parameter can be used to point the Skill CLI at the source LU files for trigger utterances. For Skills provided within this repo these can be found in the `Deployment/Resources/LU` folder of each Skill. The CLI will automatically traverse locale folder hierarchies. This can be omitted for any of the skills we provide as the LU files are provided locally. Also, you have to specify the `--cs` (for C#) or `--ts` (for TypeScript) argument for determining the coding language of your assistant, since each language takes different folder structures that need to be taken into consideration.
The `--luisFolder` parameter can be used to point the Skill CLI at the source LU files for trigger utterances. For Skills provided within this repo these can be found in the `Deployment/Resources/LU` folder of each Skill. The CLI will automatically traverse locale folder hierarchies. Also, you have to specify the `--cs` (for C#) or `--ts` (for TypeScript) argument for determining the coding language of your assistant, since each language takes different folder structures that need to be taken into consideration.
> Note: The Skills can be found in the [botframework-skills](https://github.com/microsoft/botframework-skills) repository.
## Refresh Connected Skills
Expand Down
8 changes: 5 additions & 3 deletions docs/_docs/skills/handbook/botskills.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ The CLI performs the following operations on your behalf:
```shell
npm install -g botdispatch @microsoft/botframework-cli
```
- [.NET Core runtime](https://dotnet.microsoft.com/download/dotnet-core/2.1#runtime-2.1.0): ^2.1.0
- Install the `botskills` CLI
```shell
npm install -g botskills
```

## Commands
For all of this commands, the tool assumes that you are running the CLI within the **Virtual Assistant project directory** and have created your Bot through the template, and therefore have a `skills.json` file present in the working folder which contains the connected skills.
For all of these commands, the tool assumes that you are running the CLI within the **Virtual Assistant project directory** and have created your Bot through the template.

### Connect Skills
{:.no_toc}
Expand All @@ -41,7 +42,7 @@ The `connect` command allows you to connect a Skill, be it local or remote, to y
Here is an example:
```bash
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs --luisFolder "<PATH_TO_LU_FOLDER>"
```
*Remember to re-publish your Assistant to Azure after you've added a Skill unless you plan on testing locally only*
Expand Down Expand Up @@ -70,6 +71,7 @@ Here is an example:
```bash
botskills disconnect --skillId <YOUR_SKILL_ID> --cs
```
*Bear in mind that the skillId parameter is case sensitive*
For further information, see the [Disconnect command documentation]({{site.repo}}/tree/master/tools/botskills/docs/commands/disconnect.md).
Expand All @@ -82,7 +84,7 @@ The `update` command allows you to update a Skill, be it local or remote, to you

Here is an example:
```bash
botskills update --remoteManifest "{{site.data.urls.SkillManifest}}" --cs
botskills update --remoteManifest "{{site.data.urls.SkillManifest}}" --cs --luisFolder "<PATH_TO_LU_FOLDER>"
```

For further information, see the [Update command documentation]({{site.repo}}/tree/master/tools/botskills/docs/commands/update.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/skills/handbook/multilanguage-functionality.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In this case, the intersection between the `Dispatch models` and the `languages
Taking into account the scenario mentioned, we will connect the `en-us` and `es-es` languages of the Skill to the Virtual Assistant

```bash
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs --languages "en-us,es-es"
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs --languages "en-us,es-es" --luisFolder "<PATH_TO_LU_FOLDER>"
```

> Since `--languages` is an optional argument, it will connect `en-us` by default, unless we pass a value to the argument.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ order: 2
npm install -g botdispatch @microsoft/botframework-cli
```

1. [.NET Core runtime](https://dotnet.microsoft.com/download/dotnet-core/2.1#runtime-2.1.0): ^2.1.0

1. Install Botskills CLI tool:

```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
layout: tutorial
category: Skills
subcategory: Connect to a sample
title: Update your Skill Manifest
order: 4
---

# Tutorial: {{page.subcategory}}

## {{ page.title }}

Once you've deployed the Skill, you need to update the Skill Manifest present in the bot in order to connect the Virtual Assistant to your Skill.

Currently, the manifest that you will update is available in the `manifest` folder of the Skill. `manifest-1.0` is provided for Power Virtual Agent support only, you should use `manifest-1.1` for Virtual Assistant scenarios.

| Language | Manifest folder |
|----------|-----------------|
| C# | [Link](https://github.com/microsoft/botframework-solutions/tree/master/samples/csharp/skill/SkillSample/wwwroot/manifest) |
| TypeScript | [Link](https://github.com/microsoft/botframework-solutions/tree/master/templates/typescript/samples/sample-skill/src/manifest) |

As soon as you open the Skill Manifest, you will find the following placeholders that **must be replaced** before connecting the Skill to the Virtual Assistant.
- `{YOUR_SKILL_URL}`: endpoint URL of the deployed Skill where the bot will receive the messages that matches with the "Messaging endpoint" of the Web App Bot resource after deployment (e.g. if the value is https://bf-skill.azurewebsites.net/api/messages, {YOUR_SKILL_URL} should be bf-skill.azurewebsites.net for the manifest).
- `{YOUR_SKILL_APPID}`: microsoftAppId value present in the appsettings.json file populated after the deployment of the Skill.

_Example of a Skill manifest-1.1.json_
```json
{
"$schema": "https://schemas.botframework.com/schemas/skills/skill-manifest-2.1.preview-0.json",
"$id": "SampleSkill",
"name": "SampleSkill",
"description": "SampleSkill description",
"publisherName": "Your Company",
"version": "1.1",
"iconUrl": "https://{YOUR_SKILL_URL}/SampleSkill.png",
"copyright": "Copyright (c) Microsoft Corporation. All rights reserved.",
"license": "",
"privacyUrl": "https://{YOUR_SKILL_URL}/privacy.html",
"tags": [
"sample",
"skill"
],
"endpoints": [
{
"name": "production",
"protocol": "BotFrameworkV3",
"description": "Production endpoint for the SampleSkill",
"endpointUrl": "https://{YOUR_SKILL_URL}/api/messages",
"msAppId": "{YOUR_SKILL_APPID}"
}
],
"dispatchModels": {
"languages": {
"en-us": [
{
"id": "SampleSkillLuModel-en",
"name": "CalendarSkill LU (English)",
"contentType": "application/lu",
"url": "file://SkillSample.lu",
"description": "English language model for the skill"
}
],
"de-de": [
{
"id": "SampleSkillLuModel-de",
"name": "CalendarSkill LU (German)",
"contentType": "application/lu",
"url": "file://SkillSample.lu",
"description": "German language model for the skill"
}
],
"es-es": [
{
"id": "SampleSkillLuModel-es",
"name": "CalendarSkill LU (Spanish)",
"contentType": "application/lu",
"url": "file://SkillSample.lu",
"description": "Spanish language model for the skill"
}
],
"fr-fr": [
{
"id": "SampleSkillLuModel-fr",
"name": "CalendarSkill LU (French)",
"contentType": "application/lu",
"url": "file://SkillSample.lu",
"description": "French language model for the skill"
}
],
"it-it": [
{
"id": "SampleSkillLuModel-it",
"name": "CalendarSkill LU (Italian)",
"contentType": "application/lu",
"url": "file://SkillSample.lu",
"description": "Italian language model for the skill"
}
],
"zh-cn": [
{
"id": "SampleSkillLuModel-zh",
"name": "CalendarSkill LU (Chinese)",
"contentType": "application/lu",
"url": "file://SkillSample.lu",
"description": "Chinese language model for the skill"
}
]
},
"intents": {
"Sample": "#/activities/message",
"*": "#/activities/message"
}
},
"activities": {
"sampleAction": {
"description": "Sample action which accepts an input object and returns an object back.",
"type": "event",
"name": "SampleAction",
"value": {
"$ref": "#/definitions/inputObject"
},
"resultValue": {
"$ref": "#/definitions/responseObject"
}
},
"message": {
"type": "message",
"description": "Receives the users utterance and attempts to resolve it using the skill's LU models"
}
},
"definitions": {
"inputObject": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The users name."
}
}
},
"responseObject": {
"type": "object",
"properties": {
"customerId": {
"type": "integer",
"description": "A customer identifier."
}
}
}
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: tutorial
category: Skills
subcategory: Connect to a sample
title: Connect skill
order: 4
order: 5
---

# Tutorial: {{page.subcategory}}
Expand All @@ -17,7 +17,7 @@ To add your new Skill to your assistant/Bot we provide a [botskills](https://www
Run the following command from a command prompt **within the directory of your assistant/Bot**.

```bash
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs
botskills connect --remoteManifest "{{site.data.urls.SkillManifest}}" --cs --luisFolder "<PATH_TO_LU_FOLDER>"
```

**Remember to re-publish your Assistant to Azure after you've added a Skill unless you plan on testing locally only**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: tutorial
category: Skills
subcategory: Connect to a sample
title: Test skill
order: 5
order: 6
---

# Tutorial: {{page.subcategory}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: tutorial
category: Skills
subcategory: Connect to a sample
title: Next steps
order: 6
order: 7
---

# Tutorial: {{page.subcategory}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ order: 2
```
npm install -g botdispatch @microsoft/botframework-cli
```
1. [.NET Core runtime](https://dotnet.microsoft.com/download/dotnet-core/2.1#runtime-2.1.0): ^2.1.0
1. Install BotSkills CLI tool:

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To add your new Skill to your assistant we provide the [botskills](https://www.n
Run the following command from a command prompt **within the directory of your assistant/Bot**.

```bash
botskills connect --remoteManifest "https://<YOUR_SKILL_NAME>.azurewebsites.net/manifest/manifest-1.1.json" --cs
botskills connect --remoteManifest "https://<YOUR_SKILL_NAME>.azurewebsites.net/manifest/manifest-1.1.json" --cs --luisFolder "<PATH_TO_LU_FOLDER>"
```
Remember to re-publish your assistant to Azure after you’ve added a Skill unless you plan on testing locally only.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To add your new Skill to your assistant we provide the [botskills](https://www.n
Run the following command from a command prompt **within the directory of your assistant/Bot**.

```bash
botskills connect --remoteManifest "https://<YOUR_SKILL_NAME>.azurewebsites.net/manifest/manifest-1.1.json" --ts
botskills connect --remoteManifest "https://<YOUR_SKILL_NAME>.azurewebsites.net/manifest/manifest-1.1.json" --ts --luisFolder "<PATH_TO_LU_FOLDER>"
```
Remember to re-publish your assistant to Azure after you’ve added a Skill unless you plan on testing locally only.

Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/virtual-assistant/handbook/devops.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Once you have updated your manifest, follow these steps to update any Virtual As
1. Run the following command from your project directory:

```node
botskills update --remoteManifest "http://<YOUR_SKILL_MANIFEST>.azurewebsites.net/api/skill/manifest" --cs
botskills update --remoteManifest "http://<YOUR_SKILL_MANIFEST>.azurewebsites.net/api/skill/manifest" --cs --luisFolder "<PATH_TO_LU_FOLDER>"
```

> This command updates the botFrameworkSkills property of your appsettings.json file with the latest manifest definitions for each connected skill, and runs dispatch refresh to update your dispatch model.
Loading

0 comments on commit 19b19cb

Please sign in to comment.