diff --git "a/\345\215\225\346\235\241\346\225\260\346\215\256\346\240\274\345\274\217.md" "b/\345\215\225\346\235\241\346\225\260\346\215\256\346\240\274\345\274\217.md" new file mode 100644 index 0000000..1688ba4 --- /dev/null +++ "b/\345\215\225\346\235\241\346\225\260\346\215\256\346\240\274\345\274\217.md" @@ -0,0 +1,85 @@ +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 | diff --git "a/\346\226\260\345\271\263\345\217\260\346\234\272\345\231\250\344\272\272\346\225\260\346\215\256\347\273\223\346\236\204.md" "b/\346\226\260\345\271\263\345\217\260\346\234\272\345\231\250\344\272\272\346\225\260\346\215\256\347\273\223\346\236\204.md" new file mode 100644 index 0000000..1704b94 --- /dev/null +++ "b/\346\226\260\345\271\263\345\217\260\346\234\272\345\231\250\344\272\272\346\225\260\346\215\256\347\273\223\346\236\204.md" @@ -0,0 +1,67 @@ +#### 新平台机器人新建机器人接口 + +接口名: 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 +} + + + +