我正在开发一个机器人,每当我在表单流中 PostAsync 英雄卡(50 张英雄卡)时,最后它都会给我一条错误消息:“状态大小超出了配置的限制”。来自 Microsoft.Bot.Connector.DLL
尝试 setPrivateConversationData 时发生错误
模拟器上的错误如下:
"key": {
"channelId": "emulator",
"conversationId": "i99caeb8n2h7",
"userId": "default-user"
},
"state": {
"eTag": "1506952139325",
"data": {
"ResumptionContext": {
"locale": "en-US",
"isTrustedServiceUrl": true
},
"DialogState": "H4sIAAAAAAAEAOx9B2AjWX........",
"ServiceUrl": "http://localhost:1460"
}
}
}
回复:
{
"error": {
"code": "MessageSizeTooBig",
"message": "State size exceeded configured limit."
}
}
谢谢大家
Per the docs https://learn.microsoft.com/en-us/bot-framework/troubleshoot-general-problems#is-there-a-limit-on-the-amount-of-data-i-can-store-using-the-state-api,使用默认状态功能可以存储的数据量存在限制。每个状态存储(即用户、对话和私人机器人数据包)最多可以包含 64kb 的数据。
您将必须存储更少的信息或提供自己的存储机制。
以下文章展示了如何使用 CosmosDb 管理状态数据:https://learn.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state-azure-cosmosdb https://learn.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state-azure-cosmosdb
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)