Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 92c1e45

Browse files
peterinnesmsftBatta32lauren-millsryanisgrigolmidy
authored
Update QnA Knowledgebase naming logic in qna_functions.ps1 (#3430)
* Add bot-solutions README * Updates for 1.0 * Add README reference to moved Skill samples (#3386) * Update README.md * Create README.md * updated cosmosdb settings * Fix app crash on SettingsActivity rotation; update sdk logging with OnCheckedChanged binding * added instructions for using existing LUIS models and QnA kbs with virtual assistant * updates to skill and ts deployment instructions * Update 2-download-and-install.md * Update 4-provision-your-azure-resources.md * Bump nokogiri from 1.10.5 to 1.10.9 in /docs (#3344) Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.5 to 1.10.9. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](sparklemotion/nokogiri@v1.10.5...v1.10.9) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update main README as contain outdated dependencies (#3384) * add PII telemetry instructions (#3415) * update weather doc (#3409) * Clarify role of AD App (#3405) Close #3374 * Update Summary.md (#3391) * Update Summary.md * Update Summary.md Co-authored-by: lauren-mills <[email protected]> * Update SSO with Bot doc link (#3404) * Update Speech SDK to v1.12 (#3418) * Remove preview and update packages (#3392) * Experimental Docs - Add Composer to a Skill (#3131) * add doc * updates * update to config * add composer to skill steps * Update experimental-add-composer.md * image update (#3421) * Exchanging data with skills (#3422) * exchanging data with skills * Update exchanging-data-with-skills.md Co-authored-by: Ryan Lengel Isgrig <[email protected]> * declaring $appName in UpdateLUIS (#3419) * declaring $appName in UpdateLUIS update_cognitive_models.ps1 errors out. Fix to lui_functions.ps1 to declare missing $appName Also reported at #3412 * Update luis_functions.ps1 * Update luis_functions.ps1 missing declaration * Update luis_functions.ps1 added missing declaration * Suffixing QnA knowledgebase ID on created kb name. * Applying update to all qna_function.ps1 scripts. Co-authored-by: Martin Battaglino <[email protected]> Co-authored-by: lauren-mills <[email protected]> Co-authored-by: Ryan Lengel Isgrig <[email protected]> Co-authored-by: Olivier Midy <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Darren Jefford <[email protected]> Co-authored-by: ssss141414 <[email protected]> Co-authored-by: olmidy <[email protected]> Co-authored-by: saikumaru <[email protected]>
1 parent 315012c commit 92c1e45

File tree

41 files changed

+621
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+621
-117
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@ This repository is the home for a set of templates and solutions to help build c
44

55
| Name | Description |
66
|:------------:|------------|
7-
|[<img src="https://github.com/microsoft/botframework-solutions/blob/master/docs/assets/images/icons/virtual-assistant.png" width="48"><br/> **Virtual Assistant (Preview)**](https://microsoft.github.io/botframework-solutions/overview/virtual-assistant-solution/) | Customers and partners have a significant need to deliver a conversational assistant tailored to their brand, personalized to their users, and made available across a broad range of canvases and devices. <br/><br/> This brings together all of the supporting components and greatly simplifies the creation of a new bot project including: basic conversational intents, Dispatch integration, QnA Maker, Application Insights and an automated deployment.|
8-
|[<img src="https://github.com/microsoft/botframework-solutions/blob/master/docs/assets/images/icons/skill.png" width="48"> <br/> **Skills (Preview).**](https://microsoft.github.io/botframework-solutions/overview/skills/)| **Important**: The sample Skill code is migrating to the [Bot Framework Skills repository](https://www.github.com/microsoft/botframework-skills). The source code here will be removed in the next release.<br/><br/>Extend your assistant with reusable conversational Skills to add common functionality such as collection of re-usable conversational skills enabling you to add functionality to a Virtual Assistant. Try the sample Skills available like Calendar, Email, To Do, Point of Interest, and more. |
7+
|[<img src="https://github.com/microsoft/botframework-solutions/blob/master/docs/assets/images/icons/virtual-assistant.png" width="48"><br/> **Virtual Assistant**](https://microsoft.github.io/botframework-solutions/overview/virtual-assistant-solution/) | Customers and partners have a significant need to deliver a conversational assistant tailored to their brand, personalized to their users, and made available across a broad range of canvases and devices. <br/><br/> This brings together all of the supporting components and greatly simplifies the creation of a new bot project including: basic conversational intents, Dispatch integration, QnA Maker, Application Insights and an automated deployment.|
8+
|[<img src="https://github.com/microsoft/botframework-solutions/blob/master/docs/assets/images/icons/skill.png" width="48"> <br/> **Skills (Preview).**](https://microsoft.github.io/botframework-solutions/overview/skills/)| **Important**: Sample Bot Framework Skills have been moved to the [Bot Framework Skills repository](https://www.github.com/microsoft/botframework-skills).<br/><br/>Extend your assistant with reusable conversational Skills to add common functionality such as collection of re-usable conversational skills enabling you to add functionality to a Virtual Assistant. Try the sample Skills available like Calendar, Email, To Do, Point of Interest, and more. |
99
|[<img src="https://github.com/microsoft/botframework-solutions/blob/master/docs/assets/images/icons/bi-dashboard.png" width="48"> <br/> **Analytics**](https://microsoft.github.io/botframework-solutions/solution-accelerators/tutorials/view-analytics/1-intro)| Gain key insights into your assistant’s health and behavior with the Bot Framework Analytics solutions, which includes: sample Application Insights queries and Power BI dashboards to understand the full breadth of your assistant's conversations with users.|
1010

1111
## Packages
1212

1313
### .NET
1414
| Name | Released Package | Daily Build |
1515
|---|---|---|
16-
| Microsoft.Bot.Solutions (Preview) | [![Microsoft.Bot.Solutions Badge](https://buildstats.info/nuget/Microsoft.Bot.Solutions?includePreReleases=true&dWidth=70)](https://www.nuget.org/packages/Microsoft.Bot.Solutions/) | [![BotBuilder Badge](https://buildstats.info/myget/botbuilder/aitemplates/Microsoft.Bot.Solutions?includePreReleases=true&dWidth=50)](https://botbuilder.myget.org/feed/aitemplates/package/nuget/Microsoft.Bot.Solutions) |
16+
| Microsoft.Bot.Solutions | [![Microsoft.Bot.Solutions Badge](https://buildstats.info/nuget/Microsoft.Bot.Solutions?includePreReleases=true&dWidth=70)](https://www.nuget.org/packages/Microsoft.Bot.Solutions/) | [![BotBuilder Badge](https://buildstats.info/myget/botbuilder/aitemplates/Microsoft.Bot.Solutions?includePreReleases=true&dWidth=50)](https://botbuilder.myget.org/feed/aitemplates/package/nuget/Microsoft.Bot.Solutions) |
1717

1818
### JS
1919

2020
| Name | Released Package |Daily Build |
2121
|---|---|---|
22-
| botbuilder-solutions (Preview) | [![npm version](https://badge.fury.io/js/botbuilder-solutions.svg)](https://badge.fury.io/js/botbuilder-solutions) | [Link](https://botbuilder.myget.org/feed/aitemplates/package/npm/botbuilder-solutions)
23-
| botbuilder-skills (Preview) | [![npm version](https://badge.fury.io/js/botbuilder-skills.svg)](https://badge.fury.io/js/botbuilder-skills) | [Link](https://botbuilder.myget.org/feed/aitemplates/package/npm/botbuilder-skills)
24-
| generator-botbuilder-assistant (Preview) | [![npm version](https://badge.fury.io/js/generator-botbuilder-assistant.svg)](https://badge.fury.io/js/generator-botbuilder-assistant) | [Link](https://botbuilder.myget.org/feed/aitemplates/package/npm/generator-botbuilder-assistant)
22+
| bot-solutions | [![npm version](https://badge.fury.io/js/bot-solutions.svg)](https://badge.fury.io/js/bot-solutions) | [Link](https://botbuilder.myget.org/feed/aitemplates/package/npm/bot-solutions)
23+
| generator-bot-virtualassistant | [![npm version](https://badge.fury.io/js/generator-bot-virtualassistant.svg)](https://badge.fury.io/js/generator-bot-virtualassistant) | [Link](https://botbuilder.myget.org/feed/aitemplates/package/npm/generator-bot-virtualassistant)
2524
| botskills (Preview) | [![npm version](https://badge.fury.io/js/botskills.svg)](https://badge.fury.io/js/botskills) | [Link](https://botbuilder.myget.org/feed/aitemplates/package/npm/botskills)
2625

2726
## Need Help?

docs/Gemfile.lock

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ GEM
2323
http_parser.rb (~> 0.6.0)
2424
ethon (0.12.0)
2525
ffi (>= 1.3.0)
26+
eventmachine (1.2.7)
2627
eventmachine (1.2.7-x64-mingw32)
2728
execjs (2.7.0)
2829
faraday (0.17.0)
2930
multipart-post (>= 1.2, < 3)
31+
ffi (1.11.1)
3032
ffi (1.11.1-x64-mingw32)
3133
forwardable-extended (2.6.0)
3234
gemoji (3.0.1)
@@ -211,7 +213,9 @@ GEM
211213
jekyll-seo-tag (~> 2.1)
212214
minitest (5.13.0)
213215
multipart-post (2.1.1)
214-
nokogiri (1.10.5-x64-mingw32)
216+
nokogiri (1.10.9)
217+
mini_portile2 (~> 2.4.0)
218+
nokogiri (1.10.9-x64-mingw32)
215219
mini_portile2 (~> 2.4.0)
216220
octicons (9.1.1)
217221
nokogiri (>= 1.6.3.1)
@@ -245,9 +249,9 @@ GEM
245249
tzinfo (1.2.5)
246250
thread_safe (~> 0.1)
247251
unicode-display_width (1.6.0)
248-
wdm (0.1.1)
249252

250253
PLATFORMS
254+
ruby
251255
x64-mingw32
252256

253257
DEPENDENCIES
@@ -261,7 +265,6 @@ DEPENDENCIES
261265
jekyll-toc
262266
jemoji
263267
minima (~> 2.0)
264-
wdm (~> 0.1.0)
265268

266269
BUNDLED WITH
267270
2.0.2

docs/_docs/overview/whats-new/1.0/Summary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ desired due to the waterfall flow of the VA since the 0.8 release.
2525

2626
### Language Generation
2727
{:.no_toc}
28-
With the **1.0 GA release**, we are now utilizing Language Generation 4.8 Preview. As part of this, there are some breaking changes which may require you to update your .lg files to adhere to new syntax.
28+
With the **1.0 GA release**, we are now utilizing Language Generation 4.9.1 GA. As part of this, there are some breaking changes to LG syntax which may require you to update your .lg files to adhere to new syntax.
2929

3030
For full details regarding these breaking changes, please refer to the [Language Generation 4.8 Preview breaking changes](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/language-generation#48-preview).
3131

3232
### Single Sign-On for Skills
3333
{:.no_toc}
3434
In the previous **0.8-beta release**, we added documentation covering how to enable single sign-on for Skills. In the **1.0 GA release**, these changes are officially included.
3535

36-
For instructions on enabling single sign-on for Skills, refer to the instructions located here: [Enable SSO with Skils using OAuthCredentials setting]({{site.baseurl}}//overview/whats-new/1.0/enable-sso-with-skills-using-oauthcredentials-setting).
36+
For instructions on enabling single sign-on for Skills, refer to the instructions located here: [Enable SSO with Skills using OAuthCredentials setting]({{site.baseurl}}//overview/whats-new/1.0/enable-sso-with-skills-using-oauthcredentials-setting).
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
category: Skills
3+
subcategory: Handbook
4+
title: Experimental - Adding Bot Framework Composer dialogs to a Skill
5+
description: Add dialogs built using Bot Framework Composer to a Skill enabling side by side composition of Waterfall Dialogs and Composer built Adaptive Dialogs.
6+
order: 1
7+
toc: true
8+
---
9+
10+
# {{ page.title }}
11+
{:.no_toc}
12+
{{ page.description }}
13+
14+
## Introduction
15+
16+
The [Bot Framework Composer](https://aka.ms/bfcomposer) is a visual designer that lets you quickly and easily build sophisticated conversational bots without writing code. Composer is currently in Public Preview and the documentation below covers manual steps to move Dialog management for an existing Skill created using the [Skill Template](https://microsoft.github.io/botframework-solutions/skills/tutorials/create-skill/csharp/1-intro/) to Composer.
17+
18+
For customers that already have existing Bot Framework Virtual Assistant or Custom Skill projects it's important to ensure that Waterfall dialogs and co-exist with Adaptive Dialogs built using Bot Framework Compopser. This documentation covers initial experimental tests to enable you to test hybrid dialog scenarios.
19+
20+
Moving forward there will be an updated Skill Template that will support Bot Framework Composer out of the box without these changes and you can of course use any Composer built dialog as a Skill without using the Skill Template.
21+
22+
> Note that this guidance is experimental and for testing purposes only.
23+
24+
## Pre-Requisites
25+
26+
- An existing Skill created using the Skill Template, follow [this tutorial](https://microsoft.github.io/botframework-solutions/skills/tutorials/create-skill/csharp/1-intro/) if needed.
27+
- If you have a Skill created using an older version of the Skill Template, ensure it's updated to the 4.9 Bot Framework SDK as per documentation.
28+
29+
## Build your Composer dialogs
30+
31+
The first step is to create a Composer project and create the appropriate LU, Dialog and LG assets for your scenario. Ensure these work as expected using the `Start Bot` and `Test in Emulator` feature of the Bot Framework Emulator, this will also ensure LUIS resources are published.
32+
33+
## Retrieve the Generated Files
34+
35+
1. Within Composer, and your active project. Click the `Export assets to .zip` option under the Export Menu. This self-contained ZIP file contains all of your declarative assets making up your Composer project.
36+
37+
![Export Assets to ZIP File]({{site.baseurl}}/assets/images/composer-export-assets-to-zip.png)
38+
39+
2. Unpack this ZIP file into a new sub-folder of your Skill project called `ComposerDialogs`
40+
3. Copy the `Generated Folder` from your Composer Project into the same `ComposerDialogs` folder. (Temporary)
41+
42+
## Add additional Nuget package references
43+
44+
Add the following additional Nuget packages to your project file
45+
46+
```xml
47+
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive" Version="4.9.1" />
48+
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Declarative" Version="4.9.1" />
49+
```
50+
51+
## Ensure Composer Dialog resources are configured as project content files
52+
53+
1. Edit your `.csproj` file to add the following lines under an `ItemGroup` section
54+
55+
```xml
56+
<Content Include="**/*.dialog" Exclude="bin/**">
57+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
58+
</Content>
59+
<Content Include="**/*.lg" Exclude="bin/**">
60+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
61+
</Content>
62+
<Content Include="**/*.lu" Exclude="bin/**">
63+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
64+
</Content>
65+
```
66+
67+
## Update Startup.cs
68+
69+
1. Add the following class variable
70+
71+
```csharp
72+
private IWebHostEnvironment HostingEnvironment { get; set; }
73+
```
74+
75+
2. Add the following to your constructor
76+
77+
```csharp
78+
this.HostingEnvironment = env;
79+
```
80+
81+
3. In the main `ConfigureServices` handler add the following lines to initialise Declarative dialog support and enumerate the Composer built resources.
82+
83+
```csharp
84+
// Configure Adaptive
85+
ComponentRegistration.Add(new DialogsComponentRegistration());
86+
ComponentRegistration.Add(new AdaptiveComponentRegistration());
87+
ComponentRegistration.Add(new DeclarativeComponentRegistration());
88+
ComponentRegistration.Add(new LanguageGenerationComponentRegistration());
89+
ComponentRegistration.Add(new LuisComponentRegistration());
90+
91+
// Resource explorer to manage declarative resources for adaptive dialog
92+
var resourceExplorer = new ResourceExplorer().LoadProject(this.HostingEnvironment.ContentRootPath);
93+
services.AddSingleton(resourceExplorer);
94+
```
95+
96+
4. Ensure any configuration used by the Composer based dialogs is avialable to use through adding this line to the `builder` section of the constructor
97+
98+
```csharp
99+
.AddJsonFile($"ComposerDialogs\\settings\\appsettings.json", optional:true)
100+
```
101+
102+
## Update Adapter
103+
104+
Update the `DefaultAdapter.cs` file under the `Adapters` folder as follows:
105+
106+
1. Add the following additional parameters to the constructor
107+
108+
```csharp
109+
IStorage storage,
110+
UserState userState,
111+
IConfiguration configuration
112+
```
113+
114+
2. Then add the following lines to the constructor
115+
```csharp
116+
this.Use(new RegisterClassMiddleware<IConfiguration>(configuration));
117+
this.UseStorage(storage);
118+
this.UseBotState(userState);
119+
this.UseBotState(conversationState);
120+
```
121+
122+
## Update DefaultActivityHandler
123+
124+
We need to make use of DialogManager to ensure that the Composer based dialogs execute correctly and also send the appropriate EndOfConversation event once dialogs are complete within the Skill.
125+
126+
1. Declare two new local variables
127+
128+
```csharp
129+
protected readonly DialogManager _dialogManager;
130+
protected readonly ResourceExplorer _resourceExplorer;
131+
```
132+
133+
2. Update the constructor to includes the following lines
134+
135+
```csharp
136+
_resourceExplorer = serviceProvider.GetService<ResourceExplorer>();
137+
_dialogManager = new DialogManager(dialog);
138+
_dialogManager.UseResourceExplorer(_resourceExplorer);
139+
_dialogManager.UseLanguageGeneration();
140+
```
141+
142+
3. Update the OnTurnAsync handler to use `_dialogManager` in place of `_dialog`
143+
144+
```csharp
145+
await _dialogManager.OnTurnAsync(turnContext, cancellationToken: cancellationToken);
146+
```
147+
148+
## MainDialog
149+
150+
1. Update the constructor to include the following line
151+
152+
```csharp
153+
ResourceExplorer resourceExplorer
154+
```
155+
156+
2. Then register **each** top-level Composer Dialog you wish to make available
157+
158+
```csharp
159+
var dialogResource = resourceExplorer.GetResource("todobotwithluissample-0.dialog");
160+
var composerDialog = resourceExplorer.LoadType<AdaptiveDialog>(dialogResource);
161+
162+
// Add the dialog
163+
AddDialog(composerDialog);
164+
```
165+
166+
3. Within the appropriate Intent handler within Main Dialog you can now `begin` the Composer based dialog of your choice by adding the following code:
167+
168+
```csharp
169+
object adaptiveOptions = null;
170+
return await stepContext.BeginDialogAsync("todobotwithluissample-0.dialog", adaptiveOptions, cancellationToken);
171+
```
172+
173+
## LUIS Key
174+
175+
A different LUIS endpoint key is used for your Composer built dialogs but this must be present within the `ComposerDialogs\settings\appSettings.json` file. Add an `endpointKey` entry to the `luis` section of this configuration file, you can find the right key within Composer - Bot Settings.
176+
177+
```json
178+
"luis": {
179+
"endpointKey": "YOUR KEY"
180+
},
181+
```
182+
183+
## Updating Composer artifacts
184+
185+
Using Composer, you can now Open the folder containing your updated Skill and see the Dialogs as before enabling you to easily make changes directly within the updated Skill.

docs/_docs/skills/handbook/skill-oauth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ In previous versions of Virtual Assistant Template, we used to use the Virtual A
4343
The latest Azure Bot Service has infrastructure built in to support SSO (Single Sign on). Here are the documentation for it:
4444

4545
1. [Single Sign on overview in Azure Bot Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-sso?view=azure-bot-service-4.0)
46-
1. [Add Single Sign on to a bot](https://review.docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication-sso?view=azure-bot-service-4.0&branch=pr-en-us-2084&tabs=csharp%2Ceml)
46+
1. [Add Single Sign on to a bot](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication-sso?view=azure-bot-service-4.0&tabs=csharp%2Ceml)
4747
1. [Identity Providers](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-identity-providers?view=azure-bot-service-4.0&tabs=adv1%2Cga2)
4848

4949

@@ -54,4 +54,4 @@ During development we often run into issues when using OAuth. Here's some typica
5454
1. Bad Request
5555
This happens when user clicks on the Login button in the OAuthCard. When this happens, it usually means when creating the OAuthPrompt instance, the connection name is wrong. The connection name needs to be the same as the connection setting in Bot Channel Registration page.
5656
1. API Error when calling the online resources
57-
This usually means the token you get back doesn't have enough permission to perform the tasks you're using the API for. Make sure you configure the correct Scope when you create the OAuth Connection.
57+
This usually means the token you get back doesn't have enough permission to perform the tasks you're using the API for. Make sure you configure the correct Scope when you create the OAuth Connection.

docs/_docs/skills/samples/weather.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@ toc: true
1111
# {{ page.title }}
1212
{:.no_toc}
1313

14-
The [Weather skill]({{site.repo}}/tree/master/skills/csharp/experimental/weatherskill) provides a basic Skill that integrates with [AccuWeather](https://developer.accuweather.com) to demonstrate how a weather experience can be integrated into a Virtual Assistant.
14+
The [Weather skill]({{site.repo}}/tree/master/skills/csharp/experimental/weatherskill) provides a basic Skill that integrates with [Azure Maps](https://azure.microsoft.com/en-us/services/azure-maps/) to demonstrate how a weather experience can be integrated into a Virtual Assistant.
1515

1616
## Deployment
1717
{:.no_toc}
1818
Learn how to [provision your Azure resources]({{site.baseurl}}/skills/tutorials/create-skill/csharp/4-provision-your-azure-resources/) in the Create a Skill tutorial.
1919

20+
### Supported content providers
21+
{:.no_toc}
22+
23+
> **Mandatory**: [Azure Maps](https://azure.microsoft.com/en-us/services/azure-maps/) is supported for getting detailed weather forecast such as temperature, humidity, wind of a selected location.
24+
2025
## Configuration
2126
{:.no_toc}
2227

23-
1. Get your own API Key when by following the instructions on [AccuWeather Getting Started](https://developer.accuweather.com/getting-started).
28+
1. Create your own Azure Maps account. Get your Primary Key.
2429
1. Provide this value in your `appsettings.json` file.
2530

2631
```
27-
"WeatherApiKey": "{YOUR_ACCUWEATHER_API_KEY}"
32+
"WeatherApiKey": "{YOUR_AzureMaps_KEY}"
2833
```

0 commit comments

Comments
 (0)