问题描述
我在向聊天机器人添加附件时遇到读取超时错误(从“ Microsoft.Bot.Streaming.Payloads.PayloadStream”上的“ ReadTimeout”获取值时出错。)
聊天机器人托管在Azure上,并且连接到托管在Azure中同一资源组中的Web应用程序。
Web应用程序(应用程序服务)通过直线扩展通道连接到聊天机器人。
仅当用户将图像上传到Bot时,才会发生错误。我正在使用直线javascript对象进行连接,如下面的Microsoft文档中所示:
- 创建.NET客户端以连接到Direct Line App Service扩展 (@L_502_0@)
- 将Web聊天与直接应用服务扩展一起使用 (https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline-extension-webchat-client?view=azure-bot-service-4.0)
下面是我的Bot控制器
[Route("api/messages")]
[ApiController]
public class BotController : ControllerBase
{
private readonly IBotFrameworkHttpAdapter Adapter;
private readonly IBot Bot;
public BotController(IBotFrameworkHttpAdapter adapter,IBot bot)
{
Adapter = adapter;
Bot = bot;
}
[HttpPost,HttpGet]
public async Task PostAsync()
{
// Delegate the processing of the HTTP POST to the adapter.
// The adapter will invoke the bot.
await Adapter.ProcessAsync(Request,Response,Bot);
}
该问题仅发生在直线扩展上,我已经使用IFrame进行了测试,并且效果很好。
最终目标是让用户在会话中上载QR代码图像,以便机器人将其转换为QR值并用于决策(这只是漫长对话的一个步骤)。
请帮助我了解问题出在哪里或我在这里缺少什么....
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)