Commit 57deb8e6 by 李进峰

添加分支推荐文档

parent 4fe93280
##### 分支推荐
##### 分支推荐
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment