From 57deb8e65dcac5ee8dc18fd12a969aa2b2b7db0c Mon Sep 17 00:00:00 2001 From: jinfengli Date: Thu, 8 Jul 2021 17:54:05 +0800 Subject: [PATCH] 添加分支推荐文档 --- platform/分支推荐.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 platform/分支推荐.md diff --git "a/platform/\345\210\206\346\224\257\346\216\250\350\215\220.md" "b/platform/\345\210\206\346\224\257\346\216\250\350\215\220.md" new file mode 100644 index 0000000..4d5eb5f --- /dev/null +++ "b/platform/\345\210\206\346\224\257\346\216\250\350\215\220.md" @@ -0,0 +1,110 @@ +##### 分支推荐 + +URL: {backUrl}/branch/recommend + +METHOD: POST + +RequestHeaders: + +| key | value | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Authorization | TOKEN | +| botAccount | bot帐号 | +| groupId | 组ID | +| mul | true | +| projectId | 作品ID | + +RequestBody: +```json +{ + "curPlotId":488267, // 当前剧情点ID + "nextPlotId":488268, // 下一步剧情点ID + "nextPlotNum": "1-5", // 下一步剧情点编号 + "examples":"我要去打篮球\n我要洗碗" // 分支例句 +} +``` + +ResponseBody: +```json +SUCCESS: +{ + "code": 1, + "msg": "成功", + "data": [ + { + "text1": "你要吃什么?", // 起始剧情点文本 + "text2": "你吃过了吗?这样啊,那我们还买吗?", // 终点剧情点文本 + "branchIds": [ // 分支ID列表 + 2964870, + 2964837 + ], + "branchs": [ // 分支列表, 此节点分支的内容与之前数据结构一致,字段不再阐述 + { + "id": null, + "name": "", + "remain": false, + "moveWithPlot": true, + "includeCurInfo": true, + "postURL": "", + "postActive": false, + "auxiliaryPriority": 10, + "nextPlotId": 488268, + "nextPlotNum": null, + "activateExtraPlot": [], + "modified": false, + "plotBranchMatchFieldVos": [ + { + "id": null, + "active": false, + "type": "match", + "operator": "Include", + "comparedValue": "饭:[吃动作]+饭:用+饭:用过", + "sPhrases": [], + "oPhrases": [], + "conditionId": 40923, + "conditionName": "do_what_nv", + "semanticRelationName": "ruleb0dob0whatb0nv", + "conditionQuestion": "陈述主谓关系", + "variableO": "", + "variableS": "", + "updateTime": false, + "plotBranchId": null, + "accurateMatch": false, + "accurateMatchLabel": null + } + ], + "plotBranchPremiseVos": [], + "plotBranchRelateVos": [], + "connectiveTexts": [], + "groupVarIds": [], + "order": 0, + "merge": false, + "intentFilter": false, + "examples": "我要去打篮球\n我要洗碗\n", + "createTime": 1625737362997, + "updateTime": 1625737362997 + } + ], + "score": 0.81163263, // 分数 + "examples": "我要去打篮球\n我要洗碗\n" // 例句 + } + ] +} +``` +Example: +``` +curl --location --request POST 'https://hw-gz25.heyqiwu.cn/api/platform/design/branch/recommend' \ +--header 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUyTWpVM016VTJNelFzSW1WNGNDSTZNVFl5TlRjME1qZ3pOQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TXpkOS5GTGlPc1V1TUhkLUhrbUtnWFNjc3NOZnFIcVk1X1BSSFlSczgtYk9aVTZvOnMwMHBlcnMzY3JldA==' \ +--header 'groupId: 352' \ +--header 'mul: true' \ +--header 'projectId: 807' \ +--header 'botAccount: 4596057029' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "curPlotId":488267, + "nextPlotId":488268, + "nextPlotNum": "1-5", + "examples":"我要去打篮球\n我要洗碗" +}' +``` \ No newline at end of file -- libgit2 0.27.1