Commit 4cdcb1f8 by hxw

添加condition接口文档

parent e93932d3
configList[]
configList[]
|----configStatus
|----configName
|----doPost true/false
|----postType all/term
|----postURL http://xxx.xxx
|----nextStepStatus
|----nextStepList
|----reply
|----currentPremiseList[]
| |-----actionName
| |-----cmpType match/number/time/any
|-----operator Bigger/BiggerOrEqual/Smaller/SmallerOrEqual/Early/Later
| |-----keywords
|----historyPremiseList[]
| |-----actionName
| |-----cmpType match/number
|-----operator Bigger/BiggerOrEqual/Smaller/SmallerOrEqual
| |-----keywords
|----updateKnowledge[]
| |-----variableName
| |-----keyword
1. configName:如果配置文件可以被激活,设置别名用于区分
2. configStatus: 区分配置文件是否可以被激活 0:已激活 1:待激活
3. botName:bot的名字
4. userName:用户名字
5. configList[]:配置文件的列表
6. nextSte: 下一步跳转的action,就是下一个提问
7. currentPremiseList:当前需要满足的条件,就是当前提问的列表
8. historyPremiseList:前几轮对话要满足的条件,就是历史提问的列表
9. actionName:action的名字
10. keywords:白名单列表
conditionList[]
|--active
|--conditionName
|--dataType 默认为空字符串
|--relationHead
|--relationTail
|--relationName
|--question
|--repeatList[]
| |--repeatString
| |--repeatKeywords
| --styleList
1. "conditionList[]":返回用户一次编辑的所有action
4. "conditionName": 单个condition的名字
6. "question": 单个condition下的问题
7. "repeatList[]": 返回一个condition问题的所有答案(复述)
8. "repeatString": 单个答案(复述)文本
9. "repeatKeywords":答案(复述)关键词
10. relationHead 三元祖的头部
11. relationTail 三元组的尾部
12. relationName 三元组的名字
# 配置文件类别树结构
{
“category”:[
{
"categoryName"
"categoryId"
"children":[
{"categoryName":String, "categoryId":int, "children":[]}
]
}
]
}
配置文件界面下一步选项和配置文本中的关键词的对应关系:
|功能 | 接口参数名 | 配置文本参数名|
| :----------- | :------: | :------------ |
| 跳转到下一个condition | return | return |
| 返回上一个condition | return-1 | back |
| 停留在当前condition | return-0 | stay |
| 激活配置条目 | activate | activate |
#### 新平台机器人新建机器人接口
#### 新平台机器人新建机器人接口
接口名: http://aliyun-hz1.chewrobot.com:1111/conditionProcess
METHOD: POST
Headers:
| key | value|
| :----------- | :------------ |
| Content-Type | application/json;charset=utf-8|
| Authorization | Bearer YOUR_ACCESS_TOKEN|
URL Parameters:
|参数名 | 数据类型 | 描述| SendWay |
| :----------- | :------: | :------------ | :------- |
| type | string | 默认为"game_bot_init" | JSON |
| userName | string | 用户名 | JSON |
| botName_yhm | string | bot的名字 | JSON |
| catName | string | bot类别名 | JSON |
| botId | string | 默认为"undefined" | JSON |
responseBody:
```
{
"status": 状态码, 成功时为1, 失败为0
"parameters": 如果状态为1,返回Map{"botAccount":"***"}, 如果状态为0,paramters为失败原因String
}
#### 新平台机器人删除配置条目接口
接口名: http://aliyun-hz1.chewrobot.com:1111/condition
METHOD: POST
Headers:
| key | value|
| :----------- | :------------ |
| Content-Type | application/json;charset=utf-8|
| Authorization | Bearer YOUR_ACCESS_TOKEN|
URL Parameters:
|参数名 | 数据类型 | 描述| SendWay |
| :----------- | :------: | :------------ | :------- |
| type | string | "delete_config" | JSON |
| configId | string | 配置条目id | JSON |
| botId | string | bot的id | JSON |
| botName | string | bot的引擎账号,用于修改后台配置文本 | JSON |
responseBody:
```
{
"status": 状态码, 成功时为1, 失败为0
"parameters": 如果状态为0,paramters为失败原因String
}
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