c# - luis 在 azure 上发布时机器人抛出错误,但在模拟器上工作正常
问题描述
我使用带有中间件的 c# 在框架 v4 中制作了机器人。它在模拟器上运行良好,但在 azure 上发布后抛出错误。谁能知道它的可能原因。它主要在 azure 上抛出 luis 部分的错误。错误消息是对不起,看起来出了点问题:没有这样的主机是已知的......请任何人帮助我
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
}
},
"ConnectionStrings": {
"DBConnection": ""
},
"smsApiUrl": "",
"Employee": "",
"Token": "",
"MicrosoftAppId": "",
"MicrosoftAppPassword": "",
"BotBasePath": "/api",
"BotMessagesPath": "/messages",
"AzureTableStorageConnectionString": "",
"RejectConnectionRequestIfNoAggregationChannel": true,
"PermittedAggregationChannels": "",
"NoDirectConversationsWithChannels": "emulator, facebook, skype, msteams, webchat",
"LuisAppId": "",
"LuisAPIKey": "",
"LuisAPIHostName": "westus",
"QnAKnowledgebaseId": "",
"QnAEndpointKey": "",
"QnAEndpointHostName": ""
}
解决方案
由于机器人在本地模拟器上运行良好,问题似乎是您在 Azure 上发布机器人的方式。要遵循的一些故障排除步骤是:
- 检查您是否正确配置了 appsettings.json 中的“Microsoft AppID”和“Microsoft AppPassword”。
- 验证 LuisAPIHostname 在 Azure 门户 > 您的资源组 > 应用服务 > 配置中设置为“westus”
- 仔细检查 Azure 门户中的密钥是否正确。
- 验证您是否错过了在 Azure 上部署机器人的任何步骤。
推荐阅读
- git - Azure DevOps 中新创建的 git 分支未显示在 Visual Studio 2017 中
- python - “资源耗尽:分配张量时的 OOM”在 GPT 2 模型的重新训练期间:
- python - 如何从键列表和列表值快速构建 python 字典?
- python - 在 Python 3.6+ 中,将浮点 9.9 打印为字符串 09.90 和将 10 打印为 10.00 的 f 字符串是什么?
- php - 搜索中的 Laratable 模棱两可的列
- php - 在 PHP 中用指向同一域的链接替换纯文本
- python - 如何生成具有 N 行和 N 列的数组,每个元素都是 2 行单列零矩阵?
- prolog - 是否可以延迟分配操作
- uwp-xaml - 是否有任何捷径/捷径可以从 xaml 代码创建样式资源?
- html - CSS left 属性值不适用于不同的窗口大小?