Botframework 机器人不';不要选择知识库

Botframework 机器人不';不要选择知识库,botframework,azure-language-understanding,qnamaker,Botframework,Azure Language Understanding,Qnamaker,我根据VS2019中提供的VirtualAsistantTemplate定制了一个虚拟助手。根据Microsoft文档,我对qnamaker知识库进行了更改。然后运行更新认知模型脚本。检查faq.qna文件是否有更改。但当我运行VA时,它不是从FAQ.qna中选择,而是从MainResponses.lg中选择。如何取而代之的是FAQ.qna qna-通过qnamaker.ai进行的更改之一 ##? What times is the doctor? ```markdown The doctor

我根据VS2019中提供的VirtualAsistantTemplate定制了一个虚拟助手。根据Microsoft文档,我对qnamaker知识库进行了更改。然后运行更新认知模型脚本。检查faq.qna文件是否有更改。但当我运行VA时,它不是从FAQ.qna中选择,而是从MainResponses.lg中选择。如何取而代之的是FAQ.qna

qna-通过qnamaker.ai进行的更改之一

##? What times is the doctor? ```markdown The doctor is available from Monday through Saturday from 5 pm to 9 pm ##? 医生几点来? ```降价 医生从星期一到星期六下午5点到9点有空

General.lu-更改通过luis.ai网站完成
##任命
-医生的任命
-我下周能来看医生吗?
-这周我能预约医生吗
-我今天能预约医生吗
-我今天晚上能预约医生吗
-我明天能预约医生吗
-明天早上我能预约医生吗
-医生今天有空
-医生明天有空吗?
-有医生吗?
-需要预约医生吗
-医生有多少时间?
-我今天什么时候可以看医生
-明天我什么时候可以去看医生
-我什么时候可以去看医生?
maindialog.cs,其中已初始化分派
受保护的覆盖异步任务OnContinueDialogAsync(DialogContext innerDc,CancellationToken CancellationToken=default)
{
var activity=innerDc.Context.activity;
//获取当前区域设置的认知模型。
var localizedServices=_services.GetCognitiveModels();
if(activity.Type==ActivityTypes.Message&!string.IsNullOrEmpty(activity.Text))
{
//运行LUIS识别并将结果存储在turn状态。
var dispatchResult=await localizedServices.DispatchService.RecognizeAsync(innerDc.Context,cancellationToken);
innerDc.Context.TurnState.Add(StateProperties.DispatchResult,DispatchResult);
if(dispatchResult.TopIntent().intent=**DispatchLuis**.intent.**l_General**)
{
//在通用模型上运行LUIS识别,并将结果存储在turn状态。
var generalResult=wait localizedServices.LuisServices[“General”].RecognizeAsync(innerDc.Context,cancellationToken);
innerDc.Context.TurnState.Add(StateProperties.GeneralResult,GeneralResult);
}
//检查是否有任何中断
var interrupted=await InterruptDialogAsync(innerDc,cancellationToken);
如果(中断)
{
//如果对话框被中断,则返回EndOfTurn
回报内翻;
}
}
//为“重复”功能设置响应缓存。
innerDc.Context.OnSendActivities(StoreOutgoingActivitiesAsync);
if(innerDc.ActiveDialog.Id==FaqDialogId)
{
//用户处于多回合常见问题解答对话框中
var qnaDialog=TryCreateQnADialog(FaqDialogId,localizedServices);
if(qnaDialog!=null)
{
添加对话框(qnaDialog);
}
}
返回wait base.OnContinueDialogAsync(innerDc,cancellationToken);
}
请让我知道如何解决此问题并继续前进。

mainresponses.lg中QnA的唯一响应是NoMatch和AdaptiveLearning答案。你要买哪一套?它是否每次都返回“NoMatch”响应?是的,它为所有新查询返回“NoMatch”响应。main responses.lg中QnA的唯一响应是NoMatch和AdaptiveLearning答案。你要买哪一套?它是否每次都返回“NoMatch”响应?是的,它为所有新查询返回“NoMatch”响应。

General.lu - changes are done through luis.ai website

## Appointment
- appointment of doctor
- can I come and see the doctor next week?
- can I get an appointment of doctor this week
- can I get appointment of the doctor today
- can I get appointment of the doctor today evening
- can I get appointment of doctor tomorrow
- can I get appointment of doctor tomorrow morning
- doctor available today
- Is the doctor available tomorrow?
- is a doctor available?
- need the appointment of doctor
- what is the availability of the doctor?
- what time I can see the doctor today
- what time I can visit the doctor tomorrow
- when can I visit the doctor?

maindialog.cs where the dispatch has been initialized 

protected override async Task<DialogTurnResult> OnContinueDialogAsync(DialogContext innerDc, CancellationToken cancellationToken = default)
        {
            var activity = innerDc.Context.Activity;

            // Get cognitive models for the current locale.
            var localizedServices = _services.GetCognitiveModels();

            if (activity.Type == ActivityTypes.Message && !string.IsNullOrEmpty(activity.Text))
            {
                // Run LUIS recognition and store result in turn state.
                var dispatchResult = await localizedServices.DispatchService.RecognizeAsync<DispatchLuis>(innerDc.Context, cancellationToken);
                innerDc.Context.TurnState.Add(StateProperties.DispatchResult, dispatchResult);

                if (dispatchResult.TopIntent().intent == **DispatchLuis**.Intent.**l_General**)
                {
                    // Run LUIS recognition on General model and store result in turn state.
                    var generalResult = await localizedServices.LuisServices["General"].RecognizeAsync<GeneralLuis>(innerDc.Context, cancellationToken);
                    innerDc.Context.TurnState.Add(StateProperties.GeneralResult, generalResult);
                }

                // Check for any interruptions
                var interrupted = await InterruptDialogAsync(innerDc, cancellationToken);

                if (interrupted)
                {
                    // If dialog was interrupted, return EndOfTurn
                    return EndOfTurn;
                }
            }

            // Set up response caching for "repeat" functionality.
            innerDc.Context.OnSendActivities(StoreOutgoingActivitiesAsync);
            if (innerDc.ActiveDialog.Id == FaqDialogId)
            {
                // user is in a mult turn FAQ dialog
                var qnaDialog = TryCreateQnADialog(FaqDialogId, localizedServices);
                if (qnaDialog != null)
                {
                    Dialogs.Add(qnaDialog);
                }
            }

            return await base.OnContinueDialogAsync(innerDc, cancellationToken);
        }

Please let me know how to fix this problem and move forward.