Bot Framework模拟器:未知主机 [英] Bot Framework Emulator: Unknown Host
问题描述
我正在开发一个简单的Dispatch Bot,我现在只有一个基本结构,可以在QnA或LUIS模型之间进行选择,但是当我在Bot Framework Emulator中对其进行测试时,AdapterWithErrorHandler
会出现错误,并且我没有得到任何响应LUIS都不是QnA.
I'm developing a simple Dispatch Bot, I only have a basic structure now to chose between QnA or LUIS models but when I test it in the Bot Framework Emulator, the AdapterWithErrorHandler
catches and error and i get no response from LUIS neither QnA.
每次发送消息时.
我检查了appsettings.json
,一切似乎都很好.我想指出的是,当我创建LUIS App时,给了我一个默认密钥,后来我将其与我在Azure中拥有的认知资源相关联,并给出了第二个密钥.我需要使用哪一个?
I checked the appsettings.json
and everything seems to be fine. I want to point out when I created the LUIS App a default key was given to me, and later on i linked it with the Cognitive Resource i have in Azure and a second key was given. Which one do I need to use?
除了QnAMaker资源(我在任何地方都没有读过,这会导致任何问题)之外,我所有的东西都托管在西欧服务器中.
I got everything hosted in the West Europe server except the QnAMaker resource (which I haven't read anywhere this should cause any problem).
这是仿真器日志"窗口,您可以看到直到我发送消息后问题才发生.看起来连接正确,但是找不到主机.显示的消息来自捕获异常的适配器.
This is the Emulator Log window, as you can see the problem doesn't occur until I send a message. It looks like it connects properly but then can't find the hosts. The message displayed is from the Adapter that catches de exception.
更新:该问题可能与问题有关,每当我尝试打开csproj文件以查看其内容时,都会显示以下消息:
Update: that might be relevant to the problem, whenever I try to open my csproj file to see its contents this message is displayed:
catastrophic error hresult 0x8000ffff (e_unexpected))
推荐答案
我不确定您遇到的错误,而且我还没有遇到这个错误.
I am not sure about the error you encountered and I have not met this error on my side.
但是我运行 NLP DispatchBot样本在我这边成功完成,请按照以下步骤操作,也许会对您有所帮助:
But I run NLP DispatchBot sample on my side successfully , with the steps below , maybe will helpful for you :
- 我为演示创建了一个LUIS应用程序和一个QnA制造商,如果我向我的LUIS查询"help",它将回复"Help"的意图,并将其部署在westus上:
- I created a LUIS app and a QnA maker for demo, if I query "help" to my LUIS , it will reply "Help" intent, it is deployed on westus:
这是我的QnA制造商的聚会内容:
and this is the party content of my QnA maker :
-
在项目中映射appsettings.json文件: 您的情况下
LuisAPIHostName
应该是westeurope
Mapping appsettings.json file in project :
LuisAPIHostName
in your case should bewesteurope
-
在我的情况下,如果键入help,LUIS将回复"Help"意图,以便直接转到QnA服务,因此我修改了
DispatchToTopIntentAsync
下DispatchBot.cs
文件中的匹配值以确保"Help"意图可以匹配,使我进入QnA服务:
In my case , if I type help, LUIS will reply "Help" intent so that direct to QnA service, so I modify the matching value in
DispatchBot.cs
file underDispatchToTopIntentAsync
to make sure "Help" intent can be matched to lead me to QnA service :
在本地测试:
如果您有任何不清楚的地方,请随时告诉我.
If you have anything unclear , pls feel free to let me know.
这篇关于Bot Framework模拟器:未知主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!