难以访问 Microsoft Bot Framework 中现有对话中的消息

Difficulty accessing messages in an existing conversation in Microsoft Bot Framework

我正在尝试构建一个单独的应用程序 - 基本上是我内部网上的守护进程 运行ning - 它可以连接到 Bot Connector 应用程序并访问用户和机器人之间的现有对话。

首先,我使用 DirectLine NuGet 包,然后使用在我通过模拟器与机器人开始的对话中找到的 conversationId 搜索现有消息。

例如,我启动了模拟器,并获得了 conversationId“8a684db8”。在我的控制台应用程序中,我得到了以下相关代码:

var uri = new Uri("https://directline.botframework.com");
            DirectLineClientCredentials creds = new DirectLineClientCredentials(secret); //lot into the bot framework
            DirectLineClient client = new DirectLineClient(uri, creds); //connect the client
            Conversations convs = new Conversations(client); //get the list of conversations belonging to the bot? Or does this start a new collection of conversations?
            var existing_conv_messages = convs.GetMessages(convo_id);

现在,当我尝试 运行 它时,在我试图查找现有消息的最后一行出现 "Not Found" 错误。

这里有人有解决方案吗?

发送到模拟器的对话不会发送到直线 API。要在 Direct Line 中查看消息,需要通过在线 运行 Connector 和 Direct Line 服务发送。