我正在尝试将Luis.ai集成到C#机器人框架中。该代码运行,但是当我向机器人发送消息时,它显示此错误:
“很抱歉,我的机器人代码出了问题”
当它根据使用意图的条目进行回复时,我只有两个意图“ None”和“ perfil”。
这是我的日志:
这是我的类Perfil.cs:
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Luis;
using Microsoft.Bot.Builder.Luis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
namespace SistemaExperto.Dialogs
{
[LuisModel(modelID: "e6168727-2f3e-438b-b46a-88449f4ab52f", subscriptionKey: "ed5f1bda20ac42649123b8969d30e1aa")]
[Serializable]
public class Perfil : LuisDialog<string>
{
[LuisIntent("None")]
public async Task None(IDialogContext context, LuisServiceResult result)
{
await context.PostAsync("I'm sorry I don't have that information");
await context.PostAsync("Try again");
}
[LuisIntent("perfil")]
public async Task perfil(IDialogContext context, LuisServiceResult result)
{
await context.PostAsync("My name is Alex");
}
}
}
蝴蝶不菲
相关分类