【问题标题】:Difficulty accessing messages in an existing conversation in Microsoft Bot Framework难以访问 Microsoft Bot Framework 中现有对话中的消息
【发布时间】:2016-08-21 23:07:20
【问题描述】:

我正在尝试构建一个单独的应用程序 - 基本上是在我的 Intranet 上运行的守护程序 - 可以连接到 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);

现在,当我尝试运行它时,在我尝试查找现有消息的最后一行出现“未找到”错误。

这里有人有解决方案吗?

【问题讨论】:

    标签: c# botframework


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-20
      • 2020-02-25
      • 2017-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多