diff --git a/compiler/src/userIntents_parser/parseUserIntents.ts b/compiler/src/userIntents_parser/parseUserIntents.ts index 1554f107ee813872b15c1a21a223414f1274463b..a5c970a40ef305544872d5d371f2c83d38275901 100644 --- a/compiler/src/userIntents_parser/parseUserIntents.ts +++ b/compiler/src/userIntents_parser/parseUserIntents.ts @@ -869,7 +869,7 @@ class ParseIntent { if (fs.existsSync(schemaPath)) { const schemaContent: string = fs.readFileSync(schemaPath, 'utf-8'); const schemaObj: object = JSON.parse(schemaContent); - intentObj.parameters = schemaObj.params; + intentObj.parameters = schemaObj.parameters; intentObj.llmDescription = schemaObj.llmDescription; intentObj.keywords = schemaObj.keywords; intentObj.intentName = schemaObj.intentName; diff --git a/compiler/src/userIntents_parser/schema/ControlPlayback_1.0.1.json b/compiler/src/userIntents_parser/schema/ControlPlayback_1.0.1.json index 4619ef88569231444e2d5035fa4074282e28a8b7..fa749ead2b5f875295f598441765a069c056c5e1 100644 --- a/compiler/src/userIntents_parser/schema/ControlPlayback_1.0.1.json +++ b/compiler/src/userIntents_parser/schema/ControlPlayback_1.0.1.json @@ -3,7 +3,7 @@ "intentVersion": "1.0.1", "llmDescription": "播放音乐控制", "keywords": ["ControlPlayback"], - "params": { + "parameters": { "type": "object", "propertyNames": { "enum": [ @@ -37,9 +37,32 @@ ] }, "playbackProgress": { - "description": "播放进度,单位秒", + "description": "播放进度,单位秒。", "type": "number" } } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } } } diff --git a/compiler/src/userIntents_parser/schema/PlayVideo_1.0.2.json b/compiler/src/userIntents_parser/schema/PlayVideo_1.0.2.json new file mode 100644 index 0000000000000000000000000000000000000000..3f556732cf88796dd75bd88f2d9a0a89339bffec --- /dev/null +++ b/compiler/src/userIntents_parser/schema/PlayVideo_1.0.2.json @@ -0,0 +1,61 @@ +{ + "intentName": "PlayVideo", + "intentVersion": "1.0.2", + "llmDescription": "播放视频", + "keywords": ["PlayVideo"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "entityId", + "episodeId", + "episodeNumber", + "extras" + ] + }, + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "description": "视频的唯一实体id。", + "type": "string" + }, + "episodeId": { + "description": "集数的唯一标识。", + "type": "string" + }, + "episodeNumber": { + "description": "视频的目标集数。", + "type": "number" + }, + "extras": { + "description": "其他信息扩展参数,具体由接入业务定义。", + "type": "object" + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/RechargeCallFee_1.0.1.json b/compiler/src/userIntents_parser/schema/RechargeCallFee_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..a66663a6e667aaa43c69d907b1b3b0ab0bcb7e57 --- /dev/null +++ b/compiler/src/userIntents_parser/schema/RechargeCallFee_1.0.1.json @@ -0,0 +1,48 @@ +{ + "intentName": "RechargeCallFee", + "intentVersion": "1.0.1", + "llmDescription": "充值话费", + "keywords": ["RechargeCallFee"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "phoneNumber", + "amount" + ] + }, + "properties": { + "phoneNumber": { + "description": "手机号", + "type": "number" + }, + "amount": { + "description": "金额", + "type": "number" + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "返回结果列表对象(列表Key名默认items),如果无内容则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/RideHailing_1.0.2.json b/compiler/src/userIntents_parser/schema/RideHailing_1.0.2.json new file mode 100644 index 0000000000000000000000000000000000000000..19583d8ba3d6e4c7d6995be61b073f727f03bcf0 --- /dev/null +++ b/compiler/src/userIntents_parser/schema/RideHailing_1.0.2.json @@ -0,0 +1,134 @@ +{ + "intentName": "RideHailing", + "intentVersion": "1.0.2", + "llmDescription": "开始打车", + "keywords": ["RideHailing"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "entityId", + "srcLocation", + "dstLocation", + "dstLocationType", + "hwChannelId", + "taxiType" + ] + }, + "properties": { + "entityId": { + "description": "视频的唯一实体id。", + "type": "string" + }, + "srcLocation": { + "description": "出发地信息,包括坐标系(缺省默认GCJ02),poi唯一标识,地点名称,经纬度,详细地址信息。", + "type": "object", + "properties": { + "poiId": { + "description": "唯一标识", + "type": "string" + }, + "locationName": { + "description": "地点名称", + "type": "string" + }, + "locationSystem": { + "description": "指定坐标系,(默认使用中国火星坐标系GCJ02)。", + "type": "string" + }, + "longitude": { + "description": "经度", + "type": "string" + }, + "latitude": { + "description": "纬度", + "type": "string" + }, + "address": { + "description": "详细地址信息", + "type": "string" + } + } + }, + "dstLocation": { + "description": "目的地的信息,包括坐标系(缺省默认GCJ02),poi的唯一标识,地点名称,经纬度,详细地址信息。", + "type": "object", + "properties": { + "poiId": { + "description": "唯一标识", + "type": "string" + }, + "locationName": { + "description": "地点名称", + "type": "string" + }, + "locationSystem": { + "description": "指定坐标系,(默认使用中国火星坐标系GCJ02)。", + "type": "string" + }, + "longitude": { + "description": "经度", + "type": "string" + }, + "latitude": { + "description": "纬度", + "type": "string" + }, + "address": { + "description": "详细地址信息", + "type": "string" + } + } + }, + "dstLocationType": { + "description": "目的地类型,比如'家'、'公司'。", + "type": "string" + }, + "hwChannelId": { + "description": "标识入口的渠道标识,0x00000100:小艺建议,0x00000200:小艺语音,0x00000300:拖拽入口。", + "type": "string", + "enum": [ + "0x00000100", + "0x00000200", + "0x00000300" + ] + }, + "taxiType": { + "description": "车型,0:默认,1:快车,2:出租车,3:拼车,4:顺风车,5:专车。", + "type": "number", + "default": 0, + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5 + ] + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/SendLogistics_1.0.1.json b/compiler/src/userIntents_parser/schema/SendLogistics_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..2e5b6a7c9a7245de4a6af364bb51145828dcbd9a --- /dev/null +++ b/compiler/src/userIntents_parser/schema/SendLogistics_1.0.1.json @@ -0,0 +1,43 @@ +{ + "intentName": "SendLogistics", + "intentVersion": "1.0.1", + "llmDescription": "寄快递", + "keywords": ["SendLogistics"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "sendContent" + ] + }, + "properties": { + "sendContent": { + "description": "寄件信息。", + "type": "string" + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "返回结果列表对象(列表Key名默认items),如果无内容则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/StartNavigate_1.0.1.json b/compiler/src/userIntents_parser/schema/StartNavigate_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..53a8886395db1258f6febe1b3993b0ee3f8fa592 --- /dev/null +++ b/compiler/src/userIntents_parser/schema/StartNavigate_1.0.1.json @@ -0,0 +1,157 @@ +{ + "intentName": "StartNavigate", + "intentVersion": "1.0.1", + "llmDescription": "出行导航", + "keywords": ["StartNavigate"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "entityId", + "srcLocation", + "dstLocation", + "wayPoints", + "dstLocationType", + "trafficType" + ] + }, + "properties": { + "entityId": { + "description": "数据唯一标识。", + "type": "string" + }, + "srcLocation": { + "description": "出发地信息,包括坐标系(缺省默认GCJ02),poi唯一标识,地点名称,经纬度,详细地址信息。", + "type": "object", + "properties": { + "poiId": { + "description": "唯一标识", + "type": "string" + }, + "locationName": { + "description": "地点名称", + "type": "string" + }, + "locationSystem": { + "description": "指定坐标系,(默认使用中国火星坐标系GCJ02)。", + "type": "string" + }, + "longitude": { + "description": "经度", + "type": "string" + }, + "latitude": { + "description": "纬度", + "type": "string" + }, + "address": { + "description": "详细地址信息。", + "type": "string" + } + } + }, + "dstLocation": { + "description": "目的地的信息,包括坐标系(缺省默认GCJ02),poi的唯一标识,地点名称,经纬度,详细地址信息。", + "type": "object", + "properties": { + "poiId": { + "description": "唯一标识", + "type": "string" + }, + "locationName": { + "description": "地点名称", + "type": "string" + }, + "locationSystem": { + "description": "指定坐标系,(默认使用中国火星坐标系GCJ02)。", + "type": "string" + }, + "longitude": { + "description": "经度", + "type": "string" + }, + "latitude": { + "description": "纬度", + "type": "string" + }, + "address": { + "description": "详细地址信息", + "type": "string" + } + } + }, + "wayPoints": { + "description": "途经点列表,最多传5个。", + "type": "array", + "items": { + "type": "object", + "properties": { + "poiId": { + "description": "唯一标识", + "type": "string" + }, + "locationName": { + "description": "地点名称", + "type": "string" + }, + "locationSystem": { + "description": "坐标系", + "type": "string" + }, + "longitude": { + "description": "经度", + "type": "string" + }, + "latitude": { + "description": "纬度", + "type": "string" + }, + "address": { + "description": "详细地址信息", + "type": "string" + } + } + } + }, + "dstLocationType": { + "description": "目的地类型,比如'家'、'公司'。", + "type": "string" + }, + "trafficType": { + "description": "交通方式(类型),包括驾车、步行、骑行、公交地铁。", + "type": "string", + "enum": [ + "Drive", + "Walk", + "Cycle", + "Bus", + "Subway" + ], + "default":"Drive" + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/ViewFlightTicket_1.0.1.json b/compiler/src/userIntents_parser/schema/ViewFlightTicket_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..43d22c690df6aaa30e849dd7c586c4d98b8e3b17 --- /dev/null +++ b/compiler/src/userIntents_parser/schema/ViewFlightTicket_1.0.1.json @@ -0,0 +1,57 @@ +{ + "intentName": "ViewFlightTicket", + "intentVersion": "1.0.1", + "llmDescription": "查看机票", + "keywords": ["ViewFlightTicket"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "entityId", + "cabin" + ] + }, + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "description": "数据唯一标识。", + "type": "number" + }, + "cabin": { + "description": "舱位:经济舱、头等舱、公务舱、超级经济舱。", + "type": "string", + "enum": [ + "经济舱", + "头等舱", + "公务舱", + "超级经济舱" + ] + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/ViewLogistics_1.0.1.json b/compiler/src/userIntents_parser/schema/ViewLogistics_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..efe5fac4d67e091ef6c967508e2f38ebeb4a7bbc --- /dev/null +++ b/compiler/src/userIntents_parser/schema/ViewLogistics_1.0.1.json @@ -0,0 +1,50 @@ +{ + "intentName": "ViewLogistics", + "intentVersion": "1.0.1", + "llmDescription": "查看快递", + "keywords": ["ViewLogistics"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "trackingNo", + "entityId" + ] + }, + "properties": { + "trackingNo": { + "description": "快递单号,空则停留在首页。", + "maxLength": 64, + "type": "string" + }, + "entityId": { + "description": "快递实体ID,查询场景下默认使用该字段回传打开。", + "maxLength": 64, + "type": "string" + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "返回结果列表对象(列表Key名默认items),如果无内容则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/ViewMap_1.0.1.json b/compiler/src/userIntents_parser/schema/ViewMap_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..61e8833e76e7723eba5beddbca28d8db5b687d1b --- /dev/null +++ b/compiler/src/userIntents_parser/schema/ViewMap_1.0.1.json @@ -0,0 +1,49 @@ +{ + "intentName": "ViewMap", + "intentVersion": "1.0.1", + "llmDescription": "查看地图", + "keywords": ["ViewMap"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "mapType" + ] + }, + "properties": { + "mapType": { + "description": "地图类型,枚举,Satellite:卫星地图,Standard:标准地图(默认),3D:3D地图。", + "type": "string", + "enum": [ + "Satellite", + "Standard", + "3D" + ], + "default": "Standard" + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/ViewTrainTicket_1.0.1.json b/compiler/src/userIntents_parser/schema/ViewTrainTicket_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..61f935f9aa40b2fa10f4402e62ffc591a0ea91ce --- /dev/null +++ b/compiler/src/userIntents_parser/schema/ViewTrainTicket_1.0.1.json @@ -0,0 +1,64 @@ +{ + "intentName": "ViewTrainTicket", + "intentVersion": "1.0.1", + "llmDescription": "查看火车票", + "keywords": ["ViewTrainTicket"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "entityId", + "seatLevelShow" + ] + }, + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "description": "数据唯一标识。", + "type": "number" + }, + "seatLevelShow": { + "description": "座位类型", + "type": "string", + "enum": [ + "二等座", + "二等卧", + "一等座", + "一等卧", + "商务座", + "硬座", + "软座", + "硬卧", + "软卧", + "高软", + "无座" + ] + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } + } +} diff --git a/compiler/src/userIntents_parser/schema/ViewTravelCardCode_1.0.1.json b/compiler/src/userIntents_parser/schema/ViewTravelCardCode_1.0.1.json new file mode 100644 index 0000000000000000000000000000000000000000..2bfc0204db77059ce5887dd9e8a77b29e930d289 --- /dev/null +++ b/compiler/src/userIntents_parser/schema/ViewTravelCardCode_1.0.1.json @@ -0,0 +1,52 @@ +{ + "intentName": "ViewTravelCardCode", + "intentVersion": "1.0.1", + "llmDescription": "查看乘车码", + "keywords": ["ViewTravelCardCode"], + "parameters": { + "type": "object", + "propertyNames": { + "enum": [ + "travelCardType", + "adminCode" + ] + }, + "properties": { + "travelCardType": { + "description": "缺省上次用户查看(由APP自行实现逻辑),枚举,Metro:地铁,Bus:公交。", + "type": "string", + "enum": [ + "Metro", + "Bus" + ] + }, + "adminCode": { + "description": "用户所在城市(未传时默认为APP自行获取用户当前位置城市),使用中国城市编码,定义参考https://developer.huawei.com/consumer/cn/doc/HMSCore-References/city-code-value-0000001540077092。", + "type": "number" + } + } + }, + "result": { + "type": "object", + "propertyNames": { + "enum": [ + "code", + "result" + ] + }, + "required": [ + "code", + "result" + ], + "properties": { + "code": { + "description": "意图调用返回的结果码,0代表成功。", + "type": "number" + }, + "result": { + "description": "意图调用返回的数据,如果无数据则返回空。", + "type": "object" + } + } + } +}