You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/luis-nodejs-tutorial-bf-v4.md
+3-180Lines changed: 3 additions & 180 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,189 +105,12 @@ In order to develop the web app bot code, download the code and use on your loca
105
105
106
106
1. Open the **dialogs -> luiHelper.js** file. This is where the user utterance entered into the bot is sent to LUIS. The response from LUIS is returned from the method as a **bookDetails** JSON object. When you create your own bot, you should also create your own object to return the details from LUIS.
107
107
108
-
```nodejs
109
-
// Copyright (c) Microsoft Corporation. All rights reserved.
if (!datetimeEntity || !datetimeEntity[0]) return undefined;
166
-
167
-
const timex = datetimeEntity[0]['timex'];
168
-
if (!timex || !timex[0]) return undefined;
169
-
170
-
const datetime = timex[0].split('T')[0];
171
-
return datetime;
172
-
}
173
-
}
174
-
175
-
module.exports.LuisHelper = LuisHelper;
176
-
```
108
+
[!code-javascript[Open the dialogs folder, then luiHelper.js file. This is where the user utterance entered into the bot is sent to LUIS.](~/samples-luis/documentation-samples/tutorial-web-app-bot/v4/luis-nodejs-bot-johnsmith-src/dialogs/luisHelper.js"Open the dialogs folder, then luiHelper.js file. This is where the user utterance entered into the bot is sent to LUIS.")]
177
109
178
110
1. Open **dialogs -> bookingDialog.js** to understand how the BookingDetails object is used to manage the conversation flow. Travel details are asked in steps, then the entire booking is confirmed and finally repeated back to the user.
179
111
180
-
```nodejs
181
-
// Copyright (c) Microsoft Corporation. All rights reserved.
const msg = `Please confirm, I have you traveling to: ${ bookingDetails.destination } from: ${ bookingDetails.origin } on: ${ bookingDetails.travelDate }.`;
[!code-javascript[Open dialogs folder, then bookingDialog.js file to understand how the BookingDetails object is used to manage the conversation flow.](~/samples-luis/documentation-samples/tutorial-web-app-bot/v4/luis-nodejs-bot-johnsmith-src/dialogs/bookingDialog.js"Open dialogs folder, then bookingDialog.js file to understand how the BookingDetails object is used to manage the conversation flow.")]
113
+
291
114
292
115
## Install dependencies and start the bot code in Visual Studio
0 commit comments