Skip to content

Commit 8bacaa4

Browse files
authored
Merge community content (MicrosoftDocs#748)
1 parent bff7fd4 commit 8bacaa4

10 files changed

+27
-23
lines changed

articles/bot-builder-tools-az-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ msbot connect service-type
154154
| Service type | Description |
155155
| ------ | ----------- |
156156
| azure |connect your bot to an Azure Bot Service registration|
157-
|localhost| connect your bot to a localhost endpoint|
157+
|endpoint| connect your bot to an endpoint such as localhost|
158158
|luis | connect your bot to a LUIS application |
159159
| qna |connect your bot to a QnA Knowledgebase|
160160
|help [cmd] |display help for [cmd]|

articles/bot-service-manage-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.date: 12/13/2017
1313

1414
# Connect a bot to channels
1515

16-
A channel is the connection between the Bot Framework and communication apps. You configure a bot to connect to the channels you want it to be available on. For example, a bot connected to the Skype channel can be added to a contact list and people can interact with it in Skype.
16+
A channel is a connection between the Bot Framework and communication apps. You configure a bot to connect to the channels you want it to be available on. For example, a bot connected to the Skype channel can be added to a contact list and people can interact with it in Skype.
1717

1818
The channels include many popular services, such as [Cortana](bot-service-channel-connect-cortana.md), [Facebook Messenger](bot-service-channel-connect-facebook.md), [Kik](bot-service-channel-connect-kik.md), and [Slack](bot-service-channel-connect-slack.md), as well as several others. [Skype](https://dev.skype.com/bots) and Web Chat are pre-configured for you.
1919

articles/dotnet/bot-builder-dotnet-samples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ Note: The SDK v4 is being actively developed and should therefore be used for ex
9191
To get the samples, clone the [botbuilder-dotnet](https://github.com/Microsoft/botbuilder-dotnet) GitHub repository using Git.
9292
```cmd
9393
git clone https://github.com/Microsoft/botbuilder-dotnet.git
94-
cd samples
94+
cd botbuilder-dotnet\samples-final
9595
```
96-
The sample bots built with the Bot Builder SDK for .NET are organized in the **samples** directory.
96+
The sample bots built with the Bot Builder SDK for .NET are organized in the **samples-final** directory.
9797

9898

9999
::: moniker-end

articles/includes/code/dotnet-input-hints.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@ public async Task OnTurn(ITurnContext context)
2222
if (context.Activity.Type == ActivityTypes.Message)
2323
{
2424
{
25-
// <Accepting>
25+
// <Accepting input>
2626
var reply = MessageFactory.Text(
2727
"This is the text that will be displayed.",
2828
"This is the text that will be spoken.",
2929
InputHints.AcceptingInput);
3030
await context.SendActivity(reply).ConfigureAwait(false);
31-
// </Accepting>
31+
// </Accepting input>
3232
}
3333
{
34-
// <Expecting>
34+
// <Expecting input>
3535
var reply = MessageFactory.Text(
3636
"This is the text that will be displayed.",
3737
"This is the text that will be spoken.",
3838
InputHints.ExpectingInput);
3939
await context.SendActivity(reply).ConfigureAwait(false);
40-
// </Expecting>
40+
// </Expecting input>
4141
}
4242
{
43-
// <Ignoring>
43+
// <Ignoring input>
4444
var reply = MessageFactory.Text(
4545
"This is the text that will be displayed.",
4646
"This is the text that will be spoken.",
4747
InputHints.IgnoringInput);
4848
await context.SendActivity(reply).ConfigureAwait(false);
49-
// </Ignoring>
49+
// </Ignoring input>
5050
}
5151
}
5252
}

articles/javascript/bot-builder-javascript-quickstart.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This quickstart walks you through building a bot by using the Yeoman Bot Builder
2828
> For some installations the install step for restify is giving an error related to node-gyp.
2929
> If this is the case try running `npm install -g windows-build-tools`.
3030
31+
3132
The Bot Builder SDK for JavaScript consists of a series of [packages](https://github.com/Microsoft/botbuilder-js/tree/master/libraries) which can be installed from NPM using a special `@preview` tag.
3233

3334
# Create a bot

articles/nodejs/bot-builder-nodejs-message-create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ monikerRange: 'azure-bot-service-3.0'
1212
# Create messages
1313
Communication between the bot and the user is through messages. Your bot will send message activities to communicate information to users, and likewise, will also receive message activities from users. Some messages may simply consist of plain text, while others may contain richer content such as text to be spoken, suggested actions, media attachments, rich cards, and channel-specific data.
1414

15-
This article describes some of the commonly-used message methods you can use to enhanced your user experience.
15+
This article describes some of the commonly-used message methods you can use to enhance your user experience.
1616

1717
## Default message handler
1818

articles/v4sdk/bot-builder-concept-luis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ LUIS apps recognize intent by classifying an utterance into one of multiple cate
7575
One way of reducing the number of intents is to use a hierarchical design. Consider the case of a personal assistant bot that has three intents related to weather, three intents related to home automation, and three other utility intents which are Help, Cancel and Greeting. If you put all the intents in the same LUIS app, you already have 9, and as you add features to the bot, you could end up with dozens. Instead, you can use a dispatcher LUIS app to determine whether the user's request is for weather, home automation, or utility, then call the LUIS app for the category that the dispatcher determines. In this case each of the LUIS apps only starts with 3 intents.
7676

7777
### Use a None intent
78-
It's often the case that users of your bot will say something unexpected or unrelated to the current conversation flow. The None intent is provided for handling those messages. If you don't train an intent for handling the fallback, default or "none of the above" cases, your LUIS app can only classify messages into the into intents it has defined. So for example, let's say you have a LUIS app with two intents: `HomeAutomation.TurnOn` and `HomeAutomation.TurnOff`. If those are the only intents, and the input is something unrelated like "schedule an appointment on Friday", your LUIS app has no choice but to classify that message as either HomeAutomation.TurnOn or HomeAutomation.TurnOff. If your LUIS app has a `None` intent with a few examples, you can provide some fallback logic in your bot to handle unexpected utterances.
78+
It's often the case that users of your bot will say something unexpected or unrelated to the current conversation flow. The None intent is provided for handling those messages. If you don't train an intent for handling the fallback, default or "none of the above" cases, your LUIS app can only classify messages into the intents it has defined. So for example, let's say you have a LUIS app with two intents: `HomeAutomation.TurnOn` and `HomeAutomation.TurnOff`. If those are the only intents, and the input is something unrelated like "schedule an appointment on Friday", your LUIS app has no choice but to classify that message as either HomeAutomation.TurnOn or HomeAutomation.TurnOff. If your LUIS app has a `None` intent with a few examples, you can provide some fallback logic in your bot to handle unexpected utterances.
7979

8080
### Review the utterances that LUIS app receives
8181
LUIS apps provide a feature for improving your app performance, by reviewing messages that users sent to it. See [Review suggested utterances](https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/label-suggested-utterances) for a step-by-step walkthrough.

articles/v4sdk/bot-builder-howto-qna.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ public void ConfigureServices(IServiceCollection services)
9191
options.CredentialProvider = new ConfigurationCredentialProvider(Configuration);
9292

9393
var endpoint = new QnAMakerEndpoint
94-
{
95-
knowledgebaseId = "YOUR-KB-ID",
96-
// Get the Host from the HTTP request example at https://www.qnamaker.ai
97-
// For GA services: https://<Service-Name>.azurewebsites.net/qnamaker
98-
// For Preview services: https://westus.api.cognitive.microsoft.com/qnamaker/v2.0
99-
Host = "YOUR-HTTP-REQUEST-HOST",
100-
EndpointKey = "YOUR-QNA-MAKER-SUBSCRIPTION-KEY"
101-
};
102-
options.Middleware.Add(new QnAMakerMiddleware(new QnAMakerEndpoint(endpoint)));
94+
{
95+
KnowledgeBaseId = "YOUR-KB-ID",
96+
// Get the Host from the HTTP request example at https://www.qnamaker.ai
97+
// For GA services: https://<Service-Name>.azurewebsites.net/qnamaker
98+
// For Preview services: https://westus.api.cognitive.microsoft.com/qnamaker/v2.0
99+
Host = "YOUR-HTTP-REQUEST-HOST",
100+
EndpointKey = "YOUR-QNA-MAKER-SUBSCRIPTION-KEY"
101+
};
102+
options.Middleware.Add(new QnAMakerMiddleware(endpoint));
103103
});
104104
}
105105
```

articles/v4sdk/bot-builder-howto-v4-state.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public async Task OnTurn(ITurnContext context)
195195
// context object for the next turn of the conversation can check haveAskedName
196196
convo.haveAskedNameFlag = true;
197197
}
198-
else if (convo.haveAskedNumberFlag)
198+
else if (!convo.haveAskedNumberFlag)
199199
{
200200
// Save the name.
201201
var name = context.Activity.AsMessageActivity().Text;
@@ -219,7 +219,7 @@ public async Task OnTurn(ITurnContext context)
219219
}
220220
```
221221

222-
To set up user state so that it can be returned by `ConversationState<ConversationInfo>.Get(context)`,
222+
To set up user state so that it can be returned by `UserState<UserInfo>.Get(context)`,
223223
you add user state middleware. For example, in `Startup.cs` of the ASP .NET Core EchoBot, changing the code in ConfigureServices.cs:
224224

225225
```csharp
@@ -231,6 +231,7 @@ public void ConfigureServices(IServiceCollection services)
231231

232232
IStorage dataStore = new MemoryStorage();
233233
options.Middleware.Add(new ConversationState<ConversationInfo>(dataStore));
234+
options.Middleware.Add(new UserState<UserInfo>(dataStore));
234235
});
235236
}
236237
```

articles/v4sdk/bot-builder-prompts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,12 @@ using Microsoft.Recognizers.Text;
362362
using System.Collections.Generic;
363363
```
364364

365+
365366
When we use the **ChoicePrompt** to ask the user to choose between a set of options, we have to provide the prompt with that set of options, provided within a **ChoicePromptOptions** object. Here, we use the **ChoiceFactory** to convert a list of options into an appropriate format.
366367

367368
We are also using a **SuggestedActions** activity as the reprompt, as a way of providing the input options to the user again.
368369

370+
369371
```csharp
370372
/// <summary>Defines a dialog that asks for a choice of color.</summary>
371373
public class MyDialog : DialogSet

0 commit comments

Comments
 (0)