Error Microsoft Bot Builder (chat bot)

The Bot State API is deprecated. Please refer to https://aka.ms/I6swrh to find out how to replace it with your own repository. Does anyone know what the problem is and how to set it up? The problem of local storage? image screenshot

0
source share
2 answers

In previous versions of botbuilder microsoft, api status was provided for bots. The api state controlled the state of the bot, as you might expect; such as user data, conversation data, dialogue data, etc.

Since then, they have abandoned this API and provided a way by which you can implement your own storage adapters or really affordable packages for this.

The botbuilder module provides storage in memory, which is obviously good while the bot is running, but will be lost if the bot crashes and is not suitable if you intend to load the bot balance on several machines.

I prefer to use memory in local memory for local development, and in the process of working with another adapter.

const bot = new builder.UniversalBot(connector, [..waterfall steps..]) .set('storage', new builder.MemoryBotStorage()) 

However, there are other storage adapters

The Microsoft botbuilder-azure package offers table storage, CosmosDB storage, and SQL storage.

I try to use the following botbuilder-storage package with DynamoDB adapter. It also offers Redis and MongoDB adapters.

Government management is also well documented here.

https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-state

+1
source

You need to fix this by manually installing the memory:

 var bot = new builder.UniversalBot(connector, { storage: new builder.MemoryBotStorage() }); 

Link: https://github.com/Microsoft/BotBuilder/issues/3785

0
source

Source: https://habr.com/ru/post/1273426/


All Articles