过去,我构建了一个简单的控制台应用程序,该应用程序使用LUIS Programmatic SDK创建/管理LUIS服务,并且运行良好。最近,我执行了此应用程序,并且某些特定的SDK功能(例如ImportApp和ExportApp)停止工作。 大约在Microsoft宣布新的“ LUIS V3”素材(Build 2019)的同时。 为了使我的应用程序重新启动并运行,我需要做任何更改吗?还是他们在进行某种维护,而我需要等到完成为止?
谢谢。
编辑:一些功能。这些是我要创建应用并将其导入LUIS时调用的函数。
public async Task<string> CreateApp(string culture, string name, string description = "")
{
//Culture validation
IList<AvailableCulture> availableCultures = await Client.Apps.ListSupportedCulturesAsync();
AvailableCulture usageCulture = availableCultures.Where(c => c.Code.ToLower() == culture.ToLower()).First();
if (usageCulture == null)
{
throw new Exception("Culture not supported");
}
AppCulture = usageCulture.Code;
//Luis App Creation
App = new LuisApp();
App.Name = name;
App.Culture = usageCulture.Code;
App.Desc = description;
App.VersionId = "0.1";
//--
App.ClosedLists = new List<ClosedList>();
App.Composites = new List<HierarchicalModel>();
App.Entities = new List<HierarchicalModel>();
App.Intents = new List<HierarchicalModel>();
App.ModelFeatures = new List<JSONModelFeature>();
App.PatternAnyEntities = new List<PatternAny>();
App.Patterns = new List<PatternRule>();
App.PrebuiltEntities = new List<PrebuiltEntity>();
App.RegexEntities = new List<RegexEntity>();
App.RegexFeatures = new List<JSONRegexFeature>();
App.Utterances = new List<JSONUtterance>();
//--
return App.Name;
}
public async Task<Guid> ImportApp()
{
try
{
if (AppGuid == Guid.Empty)
{
AppGuid = await Client.Apps.ImportAsync(App);
}
else
{
double version = double.Parse(App.VersionId, CultureInfo.GetCultureInfo("en-US"));
version = version + 0.1;
App.VersionId = version.ToString(CultureInfo.GetCultureInfo("en-US"));
//--
//App.VersionId = "0.2";
await Client.Versions.ImportAsync(AppGuid, App);
}
}
catch (Exception)
{
throw;
}
return AppGuid;
}
答案 0 :(得分:0)
发现了问题。它与所讨论的代码无关。多亏读过这篇文章的人