BotFramework:“状态大小超出配置的限制". [英] BotFramework: 'State size exceeded configured limit.'

查看:63
本文介绍了BotFramework:“状态大小超出配置的限制".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个机器人,每当我在表单流中张贴Async英雄卡(50张英雄卡)时,最终它会给我一个错误消息:状态大小超出配置的限制".来自Microsoft.Bot.Connector.DLL

I'm devloping a bot and whenever I PostAsync herocards (50 hero cards) in a formflow, in the end it gives me an error message: 'State size exceeded configured limit.' from Microsoft.Bot.Connector.DLL

尝试设置setPrivateConversationData时发生错误 低于模拟器上的错误:

Error happens when try to setPrivateConversationData Below the error on Emulator:

  "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."
  }
}

谢谢大家

推荐答案

每个文档,数量有限制您可以使用默认状态功能存储的数据数量.每个状态存储区(即用户,对话和私人bot数据包)最多可包含64kb的数据.

Per the docs, there is a limit on the amount of data you can store using the default State capabilities. Each state store (i.e., user, conversation, and private bot data bag) may contain up to 64kb of data.

您将必须存储较少的信息或提供自己的存储机制.

You will have to store less info or to provide your own storage mechanism.

以下文章显示了如何使用CosmosDb管理状态数据:

The following article shows how to manage state data using CosmosDb: https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state-azure-cosmosdb

这篇关于BotFramework:“状态大小超出配置的限制".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆