Bot服务将状态保存到Cosmos

Bot服务将状态保存到Cosmos

本文介绍了Azure Bot服务将状态保存到Cosmos DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

连接我的机器人以将其对话和用户状态保存到CosmosDB时出现错误:

"跨分区查询是必需的,但已禁用.请将x-ms-documentdb-query-enablecrosspartition设置为true,指定x-ms-documentdb-partitionkey或修改您的查询以避免此异常.Windows/10.0.17134 documentdb-netcore-sdk/1.9.1">

我了解添加 { EnableCrossPartitionQuery = true }

对feed的

选项应该可以解决此问题,但是在连接cosmos db以保存状态时,我无权访问写入数据的Queryable.应用程序将其烘焙到Azure.Bot.Builder库中.

对不起,如果这不是该论坛的内容.我找不到Azure Bot服务的论坛.

解决方案


I am receiving an error when connecting my bot to save its conversation and user state to CosmosDB:

"Cross partition query is required but disabled. Please set x-ms-documentdb-query-enablecrosspartition to true, specify x-ms-documentdb-partitionkey, or revise your query to avoid this exception., Windows/10.0.17134 documentdb-netcore-sdk/1.9.1"

I understand that adding  {EnableCrossPartitionQuery=true}

to the feed options should solve this, however when hooking up cosmos db to save state I do not have access to the Queryables that write data. This is baked into the Azure.Bot.Builder Libraries the application references.

Sorry if this is not for this forum. I could not locate a forum for Azure Bot Service.

解决方案


这篇关于Azure Bot服务将状态保存到Cosmos DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 18:47