LUISGen 在从 json 生成 cs 类 时抛出异常
LUISGen throws exception when generating cs classes from json
我正在尝试从 json 生成 cs calsses,我从 luis.ai 为我的一个 luis 应用导出。
但是当我 运行 命令 LUISGen myLuisApp.json -cs myClassName
我在命令行上遇到以下错误
Snapshot of exception
下面是 json 我从 luis.ai
得到的
{
"luis_schema_version": "7.0.0",
"versionId": "0.1",
"name": "myBotName",
"desc": "",
"culture": "en-us",
"tokenizerVersion": "1.0.0",
"patternAnyEntities": [],
"regex_entities": [],
"phraselists": [],
"regex_features": [],
"patterns": [],
"intents": [
{
"name": "ApproveAllTasksOnMe"
},
{
"name": "ApproveTask"
},
{
"name": "GetApprovedTasks"
},
{
"name": "GetCompletedTasks"
},
{
"name": "GetLastApprovedTask"
},
{
"name": "GetLastNTasks"
},
{
"name": "GetLastRejectedTask"
},
{
"name": "GetRejectedTasks"
},
{
"name": "GetTaskDetails"
},
{
"name": "GetTasks"
},
{
"name": "GetTotalPendingTasks"
},
{
"name": "GetTotalTasksCompleted"
},
{
"name": "None"
},
{
"name": "RejectAllTasksOnMe"
},
{
"name": "RejectTask"
}
],
"entities": [
{
"name": "Application",
"children": [],
"roles": [],
"features": []
},
{
"name": "Email",
"children": [
{
"name": "AssignedTo",
"children": [],
"features": []
},
{
"name": "InitiatedBy",
"children": [],
"features": []
}
],
"roles": [],
"features": []
},
{
"name": "Name",
"children": [
{
"name": "AssignedTo",
"children": [],
"features": []
},
{
"name": "InitiatedBy",
"children": [],
"features": []
}
],
"roles": [],
"features": []
},
{
"name": "Status",
"children": [],
"roles": [],
"features": []
},
{
"name": "Workspace",
"children": [],
"roles": [],
"features": []
}
],
"hierarchicals": [],
"composites": [],
"closedLists": [],
"prebuiltEntities": [],
"utterances": [
{
"text": "all approved tasks",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "all tasks",
"intent": "GetTasks",
"entities": []
},
{
"text": "approve all",
"intent": "ApproveAllTasksOnMe",
"entities": []
},
{
"text": "approve task",
"intent": "ApproveTask",
"entities": []
},
{
"text": "get all tasks i approved",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "get all tasks i rejected",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "get last 5 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "get last approved task",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "get last rejected task",
"intent": "GetLastRejectedTask",
"entities": []
},
{
"text": "get task details",
"intent": "GetTaskDetails",
"entities": []
},
{
"text": "get tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 21,
"endPos": 22,
"children": [
{
"entity": "AssignedTo",
"startPos": 21,
"endPos": 22,
"children": []
}
]
}
]
},
{
"text": "how man tasks are pending on me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "how many tasks are assigned to me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "how many tasks i closed today",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "how many tasks were completed by me",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "last 7 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "last approved task",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "last task i approved",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "last task i rejected",
"intent": "GetLastRejectedTask",
"entities": []
},
{
"text": "list my tasks",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 5,
"endPos": 6,
"children": [
{
"entity": "AssignedTo",
"startPos": 5,
"endPos": 6,
"children": []
}
]
}
]
},
{
"text": "number of tasks closed",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "reject all",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject all my tasks",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject all tasks",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject this task",
"intent": "RejectTask",
"entities": []
},
{
"text": "show all completed tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show all done tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show all tasks approved by me",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "show done tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show how many tasks are closed",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "show last 2 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "show my tasks",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 5,
"endPos": 6,
"children": [
{
"entity": "AssignedTo",
"startPos": 5,
"endPos": 6,
"children": []
}
]
}
]
},
{
"text": "show tasks i took action on",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 22,
"endPos": 23,
"children": [
{
"entity": "AssignedTo",
"startPos": 22,
"endPos": 23,
"children": []
}
]
}
]
},
{
"text": "tasks assigned to me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 18,
"endPos": 19,
"children": [
{
"entity": "AssignedTo",
"startPos": 18,
"endPos": 19,
"children": []
}
]
}
]
},
{
"text": "tasks i rejected",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 17,
"endPos": 18,
"children": [
{
"entity": "AssignedTo",
"startPos": 17,
"endPos": 18,
"children": []
}
]
}
]
},
{
"text": "tasks rejected by me",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "tasks waiting for my attention",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 18,
"endPos": 19,
"children": [
{
"entity": "AssignedTo",
"startPos": 18,
"endPos": 19,
"children": []
}
]
}
]
},
{
"text": "tasks waiting on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 17,
"endPos": 18,
"children": [
{
"entity": "AssignedTo",
"startPos": 17,
"endPos": 18,
"children": []
}
]
}
]
},
{
"text": "today's priorities",
"intent": "GetTasks",
"entities": []
},
{
"text": "total tasks for me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "what are my tasks for the day",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 9,
"endPos": 10,
"children": [
{
"entity": "AssignedTo",
"startPos": 9,
"endPos": 10,
"children": []
}
]
}
]
}
],
"settings": []
}
当 运行 与 json from examples 相同的命令时,它生成 类 没有任何错误。
任何人都可以帮助我了解我可能做错了什么或者我是否遗漏了什么?
我已经使用以下命令安装了 LUISGen dotnet tool install --global LUISGen --version 2.2.0
通常我会说“确保您使用的是该工具的最高 up-to-date 版本”,但是
LUISGen
已弃用(遗留工具)。新的 botframework-cli 旨在取代遗留的独立工具。我不认为你遗漏了什么,但它已经快一年没有更新了。
botframework-cli 有一个类似的命令:bf luis:generate:cs
用于在 LUIS 模型上生成 CS 类。
https://github.com/microsoft/botframework-cli/blob/main/packages/luis/README.md#bf-luisgeneratecs
我正在尝试从 json 生成 cs calsses,我从 luis.ai 为我的一个 luis 应用导出。
但是当我 运行 命令 LUISGen myLuisApp.json -cs myClassName
我在命令行上遇到以下错误
Snapshot of exception
下面是 json 我从 luis.ai
得到的{
"luis_schema_version": "7.0.0",
"versionId": "0.1",
"name": "myBotName",
"desc": "",
"culture": "en-us",
"tokenizerVersion": "1.0.0",
"patternAnyEntities": [],
"regex_entities": [],
"phraselists": [],
"regex_features": [],
"patterns": [],
"intents": [
{
"name": "ApproveAllTasksOnMe"
},
{
"name": "ApproveTask"
},
{
"name": "GetApprovedTasks"
},
{
"name": "GetCompletedTasks"
},
{
"name": "GetLastApprovedTask"
},
{
"name": "GetLastNTasks"
},
{
"name": "GetLastRejectedTask"
},
{
"name": "GetRejectedTasks"
},
{
"name": "GetTaskDetails"
},
{
"name": "GetTasks"
},
{
"name": "GetTotalPendingTasks"
},
{
"name": "GetTotalTasksCompleted"
},
{
"name": "None"
},
{
"name": "RejectAllTasksOnMe"
},
{
"name": "RejectTask"
}
],
"entities": [
{
"name": "Application",
"children": [],
"roles": [],
"features": []
},
{
"name": "Email",
"children": [
{
"name": "AssignedTo",
"children": [],
"features": []
},
{
"name": "InitiatedBy",
"children": [],
"features": []
}
],
"roles": [],
"features": []
},
{
"name": "Name",
"children": [
{
"name": "AssignedTo",
"children": [],
"features": []
},
{
"name": "InitiatedBy",
"children": [],
"features": []
}
],
"roles": [],
"features": []
},
{
"name": "Status",
"children": [],
"roles": [],
"features": []
},
{
"name": "Workspace",
"children": [],
"roles": [],
"features": []
}
],
"hierarchicals": [],
"composites": [],
"closedLists": [],
"prebuiltEntities": [],
"utterances": [
{
"text": "all approved tasks",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "all tasks",
"intent": "GetTasks",
"entities": []
},
{
"text": "approve all",
"intent": "ApproveAllTasksOnMe",
"entities": []
},
{
"text": "approve task",
"intent": "ApproveTask",
"entities": []
},
{
"text": "get all tasks i approved",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "get all tasks i rejected",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "get last 5 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "get last approved task",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "get last rejected task",
"intent": "GetLastRejectedTask",
"entities": []
},
{
"text": "get task details",
"intent": "GetTaskDetails",
"entities": []
},
{
"text": "get tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 21,
"endPos": 22,
"children": [
{
"entity": "AssignedTo",
"startPos": 21,
"endPos": 22,
"children": []
}
]
}
]
},
{
"text": "how man tasks are pending on me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "how many tasks are assigned to me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "how many tasks i closed today",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "how many tasks were completed by me",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "last 7 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "last approved task",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "last task i approved",
"intent": "GetLastApprovedTask",
"entities": []
},
{
"text": "last task i rejected",
"intent": "GetLastRejectedTask",
"entities": []
},
{
"text": "list my tasks",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 5,
"endPos": 6,
"children": [
{
"entity": "AssignedTo",
"startPos": 5,
"endPos": 6,
"children": []
}
]
}
]
},
{
"text": "number of tasks closed",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "reject all",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject all my tasks",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject all tasks",
"intent": "RejectAllTasksOnMe",
"entities": []
},
{
"text": "reject this task",
"intent": "RejectTask",
"entities": []
},
{
"text": "show all completed tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show all done tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show all tasks approved by me",
"intent": "GetApprovedTasks",
"entities": []
},
{
"text": "show done tasks",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show how many tasks are closed",
"intent": "GetTotalTasksCompleted",
"entities": []
},
{
"text": "show last 2 tasks",
"intent": "GetLastNTasks",
"entities": []
},
{
"text": "show my tasks",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 5,
"endPos": 6,
"children": [
{
"entity": "AssignedTo",
"startPos": 5,
"endPos": 6,
"children": []
}
]
}
]
},
{
"text": "show tasks i took action on",
"intent": "GetCompletedTasks",
"entities": []
},
{
"text": "show tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 22,
"endPos": 23,
"children": [
{
"entity": "AssignedTo",
"startPos": 22,
"endPos": 23,
"children": []
}
]
}
]
},
{
"text": "tasks assigned to me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 18,
"endPos": 19,
"children": [
{
"entity": "AssignedTo",
"startPos": 18,
"endPos": 19,
"children": []
}
]
}
]
},
{
"text": "tasks i rejected",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "tasks pending on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 17,
"endPos": 18,
"children": [
{
"entity": "AssignedTo",
"startPos": 17,
"endPos": 18,
"children": []
}
]
}
]
},
{
"text": "tasks rejected by me",
"intent": "GetRejectedTasks",
"entities": []
},
{
"text": "tasks waiting for my attention",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 18,
"endPos": 19,
"children": [
{
"entity": "AssignedTo",
"startPos": 18,
"endPos": 19,
"children": []
}
]
}
]
},
{
"text": "tasks waiting on me",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 17,
"endPos": 18,
"children": [
{
"entity": "AssignedTo",
"startPos": 17,
"endPos": 18,
"children": []
}
]
}
]
},
{
"text": "today's priorities",
"intent": "GetTasks",
"entities": []
},
{
"text": "total tasks for me",
"intent": "GetTotalPendingTasks",
"entities": []
},
{
"text": "what are my tasks for the day",
"intent": "GetTasks",
"entities": [
{
"entity": "Name",
"startPos": 9,
"endPos": 10,
"children": [
{
"entity": "AssignedTo",
"startPos": 9,
"endPos": 10,
"children": []
}
]
}
]
}
],
"settings": []
}
当 运行 与 json from examples 相同的命令时,它生成 类 没有任何错误。
任何人都可以帮助我了解我可能做错了什么或者我是否遗漏了什么?
我已经使用以下命令安装了 LUISGen dotnet tool install --global LUISGen --version 2.2.0
通常我会说“确保您使用的是该工具的最高 up-to-date 版本”,但是
LUISGen
已弃用(遗留工具)。新的 botframework-cli 旨在取代遗留的独立工具。我不认为你遗漏了什么,但它已经快一年没有更新了。
botframework-cli 有一个类似的命令:bf luis:generate:cs
用于在 LUIS 模型上生成 CS 类。
https://github.com/microsoft/botframework-cli/blob/main/packages/luis/README.md#bf-luisgeneratecs