This commit is contained in:
Ganapathi Diddi 2024-05-06 12:26:12 +05:30
Родитель 14ce4e99d4
Коммит a5cef2d242
5 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -63,7 +63,7 @@ Samples are designed to illustrate functionality you'll need to implement to bui
|19|Custom dialogs | Demonstrates complex conversation flow using the Dialogs library. |[.NET Core][cs#19]|[JavaScript][js#19]|[Python][py#19]|[Java][java#19]
|21|Application Insights | Demonstrates how to add telemetry logging to your bot, storing telemetry within Application Insights.|[.NET Core][cs#21] |[JavaScript][js#21] ||[Java][java#21]
|23|Facebook events | Integrate and consume Facebook specific payloads, such as post-backs, quick replies and opt-in events.|[.NET Core][cs#23] |[JavaScript][js#23] |[Python][py#23]|[Java][java#23]
|42|Scale out | Demonstrates how you can build your own state solution from the ground up that supports scaled out deployment with ETag based optimistic locking. |[.NET Core][cs#42] | |[Python][py#42]|[Java][java#42]
|42|Scale out | Demonstrates how you can build your own state solution from the ground up that supports scaled out deployment with ETag based optimistic locking. |[.NET Core][cs#42] |[JavaScript][js#42] |[Python][py#42]|[Java][java#42]
|44|Basic custom prompts | Demonstrates how to implement your own _basic_ prompts to ask the user for information. |[.NET Core][cs#44]|[JavaScript][js#44]|[Python][py#44]|[Java][java#44]
|47|Inspection middleware | Demonstrates how to use middleware to allow the Bot Framework Emulator to debug traffic into and out of the bot in addition to looking at the current state of the bot. | [.NET Core][cs#47] | [JavaScript][js#47] |[Python][py#47]|[Java][java#47]
|70|Styling webchat | This sample shows how to create a web page with custom Web Chat component.| | [ECMAScript 6][es#70] |
@ -179,6 +179,7 @@ A [collection of **experimental** samples](./experimental) exist, intended to pr
[js#23]:samples/javascript_nodejs/23.facebook-events
[js#24]:samples/javascript_nodejs/24.bot-authentication-msgraph
[js#40]:samples/javascript_nodejs/40.timex-resolution
[js#42]:samples/javascript_nodejs/42.scale-out
[js#43]:samples/javascript_nodejs/43.complex-dialog
[js#44]:samples/javascript_nodejs/44.prompt-for-user-input
[js#45]:samples/javascript_nodejs/45.state-management

Просмотреть файл

@ -5,14 +5,14 @@ const { ActivityHandler } = require('botbuilder');
const { MemoryStore } = require('../memoryStore');
const { DialogHost } = require('../dialogHost');
class DialogBot extends ActivityHandler {
class ScaleoutBot extends ActivityHandler {
/**
*
* @param {Dialog} dialog
*/
constructor(dialog) {
super();
if (!dialog) throw new Error('[DialogBot]: Missing parameter. dialog is required');
if (!dialog) throw new Error('[ScaleoutBot]: Missing parameter. dialog is required');
this.dialog = dialog;
@ -51,4 +51,4 @@ class DialogBot extends ActivityHandler {
}
}
module.exports.DialogBot = DialogBot;
module.exports.ScaleoutBot = ScaleoutBot;

Просмотреть файл

@ -18,7 +18,7 @@ const {
} = require('botbuilder');
const { MemoryStore } = require('./memoryStore');
const { DialogBot } = require('./bots/dialogBot');
const { ScaleoutBot } = require('./bots/scaleoutBot');
const { RootDialog } = require('./dialogs/rootDialog');
// Create HTTP server.
@ -49,7 +49,7 @@ const userState = new UserState(memoryStorage);
const dialog = new RootDialog(userState);
// Create the bot's main handler.
const bot = new DialogBot(conversationState, userState, dialog);
const bot = new ScaleoutBot(conversationState, userState, dialog);
// Listen for incoming requests.
server.post('/api/messages', async (req, res) => {

Просмотреть файл

@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
class MemoryStore {
constructor() {

Просмотреть файл

@ -13,10 +13,9 @@
},
"repository": {
"type": "git",
"url": "https://github.com"
"url": "https://github.com/Microsoft/BotBuilder-Samples.git"
},
"dependencies": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.1.4",
"botbuilder": "~4.22.1",
"botbuilder-ai": "~4.22.1",
"botbuilder-dialogs": "~4.22.1",