Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jiaoyou_doc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyinting
jiaoyou_doc
Commits
9d0a0ba9
Commit
9d0a0ba9
authored
Nov 04, 2023
by
realcaiyizhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并君强的手动调用接口
parent
f62a9665
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1304 additions
and
1 deletion
+1304
-1
chatruntime接口.md
chat_server/chatruntime接口.md
+1304
-1
No files found.
chat_server/chatruntime接口.md
View file @
9d0a0ba9
[
TOC
]
[
TOC
]
...
...
@@ -1530,8 +1530,1311 @@ curl --location 'http://10.0.7.5:8081/user/var/gb/put' \
```
# chatruntime手工调用调试接口
## 1.重新加载意图数据
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/api/intent/data/update?secret=f1fvo0Yhw199PIHWTmCbbQ
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:重新加载意图数据--意图组是个配置文件,配置文件重新加载,不用重启chatruntime,手动调用。加载“systemintentbotv1.json”文件。
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/api/intent/data/update?secret=f1fvo0Yhw199PIHWTmCbbQ'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| secret | String | f1fvo0Yhw199PIHWTmCbbQ | 是 | 密钥 |
> 响应示例
正确响应
```
agsl
{
"code": 1,
"message": "成功",
"data": null
}
```
### Response中data参数说明
| 参数名 | 示例值 | 参数描述 |
| --- | --- | --- |
| code | 1 | 返回的状态码 |
| message | 成功 | 返回的状态信息 |
| data | null | 返回的数据 |
## 2.手动新增 渠道+uid 列表给系统
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/monitor/channelUid?secret=qiwu888
-
请求方式:PUT
-
Content-Type: application/json;charset=UTF-8
-
功能描述:更新所有监控的渠道+uid,把要开启日志的uid手动更新给系统
-
请求指令:
```
curl --location --request PUT 'http://tx-gz10.heyqiwu.cn/chatruntime/monitor/channelUid?secret=qiwu888' \
--header 'Content-Type: application/json' \
--data '[
"juesexianliao-robot-api-test6542034b5a2030093d93e733"
]
'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| secret | String | qiwu888 | 是 | 密钥 |
| monitorChannelUids | Set
<
String>
| juesexianliao-robot-api-test6542034b5a2030093d93e733 | 是 | 渠道+uid |
### 请求的json
```
agsl
[
"juesexianliao-robot-api-test6542034b5a2030093d93e733"
]
```
> 响应示例
正确响应
```
agsl
{
"code": 1,
"message": "成功",
"data": null
}
```
### Response中data参数说明
| 参数名 | 示例值 | 参数描述 |
| --- | --- | --- |
| code | 1 | 返回的状态码 |
| message | 成功 | 返回的状态信息 |
| data | null | 返回的数据 |
## 3.获取可以开启用户日志的 渠道+uid 列表
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/monitor/channelUid/all?secret=qiwu888
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:获取更新开启用户日志,监控的渠道+uid,生产环境默认关闭的,看某个用户某个bot的日志的开关,调用就打开,打开后再对话窗口,点左边齿轮可以看日志。
获取所有监控的uid, 看开启日志的uid有哪些。上个接口新增的数据。
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/monitor/channelUid/all?secret=qiwu888'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| secret | String | qiwu888 | 是 | 密钥 |
> 响应示例
正确响应
```
agsl
{
"code": 1,
"msg": "成功",
"data": [
"juesexianliao-robot-api-test6542034b5a2030093d93e733"
]
}
```
### Response中data参数说明
| 参数名| 数据类型 | 示例值 | 参数描述 |
| ---|---| --- | --- |
| code|int | 1 | 返回的状态码 |
| message| String | 成功 | 返回的状态信息 |
| data| Set
<
String>
|
\[
"juesexianliao-robot-api-test6542034b5a2030093d93e733"
\]
| channelUid的集合 |
## 4.获取所有在线bot
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/online/all
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:获取所有在线bot
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/online/all'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| 无 | 无 | 无 | 否 | 无 |
> 响应示例
正确响应
```
agsl
[
{
"botAccount": "gz33bottaozhiyaoyaobeijingt388169685",
"workName": "逃之夭夭"
},
{
"botAccount": "txgz14botshoubiaotuijian0130373633996",
"workName": "手表推荐"
},
{
"botAccount": "txgz12botxindongyisha651523980",
"workName": "跨越时空的爱恋"
},
{
"botAccount": "gz33bot077403699164",
"workName": "女尊之帝凰大业"
},
{
"botAccount": "gz33botqirituodanjihua0913t849469114",
"workName": "七日脱单计划"
},
{
"botAccount": "gz25botshoubiaozhongkong090274765560",
"workName": "手表中控"
}
]
```
### Response中data参数说明
| 参数名| 数据类型 | 示例值 | 参数描述 |
|---|---|---|---|
| botObjList | List
<
JSONObject
>
| | 在线botId和作品名称的数组 |
| botAccount| String | gz25botshoubiaozhongkong090274765560 | botId |
| workName| String | 手表中控 | 作品名称 |
## 5.计算单个bot的内存占用
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/work/mem/info?secret=75888&botAccount=txgz14botbaihuashennv974132490&clear=1
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:计算单个bot的内存占用。
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/work/mem/info?secret=75888&botAccount=txgz14botbaihuashennv974132490&clear=1'
```
### <span style="color: red;">注意:该方法慎用,可能会导致服务下线</span>
-
如遇到的话,重启chatruntime,并且在服务器调用:
curl --location --request PUT 'http://localhost:8081/system/server?status=1&secret=f1fvo0Yhw199PIHWTmCbbQ'
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| secret | String | 75888 | 是 | 秘钥 |
| botAccount | String | txgz14botbaihuashennv974132490 | 是 | bot的ID |
| clear | Integer | 1 | 否 | 计算完毕是否从内存清除,不填默认为1 |
> 响应示例
正确响应(已简化数据)
```
agsl
{
"name": "百花神女",
"size": 50127760,
"sizeStr": "47.81MB",
"branchSize": 0,
"botAccount": "txgz14botbaihuashennv974132490",
"memoryCounts": [
{
"name": "ID对应ACTION配置",
"size": 48766784,
"sizeStr": "46.51MB",
"rate": "49.15446",
"branchSize": 0
}
]
}
```
### Response中data参数说明
| 参数名 | 数据类型 | 示例值 | 参数描述 |
| ---|----| --- | --- |
| name| String | 百花神女 | 作品名 |
| size | long | 50127760 | bot数据所占用的内存大小,单位B |
| sizeStr| String | 47.81MB | 人性化的统计结果 |
| branchSize | long | 0 | 分支数量 |
| botAccount | String | txgz14botbaihuashennv974132490 | bot id |
| memoryCounts | List
<
MemoryCountBO
>
| memoryCount | 每个分支的统计结果 |
| memoryCount.name| String | ID对应ACTION配置 | name |
| memoryCount.size| long | 48766784 | bot数据所占用的内存大小,单位B |
| memoryCount.sizeStr| String | 46.51MB | 人性化的统计结果 |
| memoryCount.rate| String | 49.15446 | 占比 % |
| memoryCount.branchSize| long | 0 | 分支数量 |
## 6.计算所有在线bot的内存占用
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/work
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:计算所有在线bot的内存占用
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/work'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| 无 | 无 | 无 | 无 | 无 |
> 响应示例
正确响应(已简化数据)
```
agsl
{
"code": 1,
"msg": "成功",
"data": {
"totalSize": 462485024,
"totalSizeStr": "441.06MB",
"memoryCounts": [
{
"name": "手表中控",
"size": 6468488,
"sizeStr": "6.17MB",
"rate": "1.3986373",
"branchSize": 0,
"botAccount": "gz25botshoubiaozhongkong090274765560",
"memoryCounts": [
{
"name": "预处理词组配置",
"size": 5526960,
"sizeStr": "5.27MB",
"rate": "43.095417",
"branchSize": 0
}
]
}
]
}
}
```
### Response中data参数说明
| 参数名 | 数据类型 | 示例值 | 参数描述 |
| --- |---| --- | --- |
| code | int | 1 | 返回的状态码 |
| message| String | 成功 | 返回的状态信息 |
| data | JSONObject | | 返回的数据 |
| totalSize| long | 462485024 | 总的占用内存,单位 B |
| totalSizeStr| String | 441.06MB | 人性化计算结果 |
| memoryCounts| List
<
MemoryCountBO
>
| memoryCount | 作品信息数组 |
| memoryCount.name| String | 预处理词组配置 | 作品名 |
| memoryCount.size| long | 5526960 | bot数据所占用的内存大小,单位B |
| memoryCount.sizeStr| String | 5.27MB | 人性化的统计结果 |
| memoryCount.rate| String | 43.095417 | 占比 % |
| memoryCount.branchSize| long | 0 | 分支数量 |
## 7.统计所有在线bot
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/branch
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:统计所有在线bot,并统计分支占用内存的大小。该操作加载的数据比较多。
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/branch'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| 无 | 无 | 无 | 无 | 无 |
> 响应示例
### 正确响应(已简化数据)
<details><summary>
展开查看
</summary>
```
<code>
{
"code": 1,
"msg": "成功",
"data": {
"totalSize": 1397749808,
"botCount": 8,
"totalSizeStr": "1.30GB",
"memoryCounts": [
{
"name": "七日脱单计划",
"size": 413273336,
"sizeStr": "394.13MB",
"rate": "29.567047",
"branchSize": 72419,
"botAccount": "gz33botqirituodanjihua0913t849469114",
"memoryCounts": [
{
"name": "4072399::ruleb0whatb0haveb0notb0things::监听[]的分支[陈述之否定加名词]",
"size": 297456,
"sizeStr": "290.48KB",
"rate": "0.06693422",
"branchSize": 0,
"action": {
"id": 4072399,
"labelName": "监听[]的分支[陈述之否定加名词]",
"branchName": "plot_listening",
"auxiliaryPriority": 12,
"priority": 2,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】好的,请继续~",
"indexName": "ruleb0whatb0haveb0notb0things",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0whatb0haveb0notb0things",
"conditionName": "what_have_not_things_qiwuno1_indep",
"compareOperator": "match-Include",
"valueRange": [
"不:今日多段谈计划",
"别:七日脱单小计划",
"别:今日佛山计划"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
},
{
"semanticRelationName": "ruleb0gameb0exit",
"conditionName": "exit",
"compareOperator": "match-Include",
"valueRange": [
"70多单几了:退出",
"七曰脱单挑战:退出",
"七日心动男友:退出",
"7千多脱单:退出",
"7日脱单大作战:退出"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072396::ruleb0notdob0whatb0vn::监听[]的分支[陈述否定之动宾]",
"size": 226568,
"sizeStr": "221.26KB",
"rate": "0.050982844",
"branchSize": 0,
"action": {
"id": 4072396,
"labelName": "监听[]的分支[陈述否定之动宾]",
"branchName": "plot_listening",
"auxiliaryPriority": 11,
"priority": 1,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►系统退出:当前作品◄~",
"indexName": "ruleb0notdob0whatb0vn",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0notdob0whatb0vn",
"conditionName": "notdo_what_vn_qiwuquit7_indep",
"compareOperator": "match-Include",
"valueRange": [
"体验:7天年脱单日记",
"玩儿:7天内脱单季",
"体验:七日通单计划",
"玩儿:7日脱单记有"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072388::ruleb0whatb0haveb0notb0things::监听[]的分支[陈述之否定加名词]",
"size": 224936,
"sizeStr": "219.66KB",
"rate": "0.050615605",
"branchSize": 0,
"action": {
"id": 4072388,
"labelName": "监听[]的分支[陈述之否定加名词]",
"branchName": "plot_listening",
"auxiliaryPriority": 12,
"priority": 2,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►取消收藏:当前作品◄~",
"indexName": "ruleb0whatb0haveb0notb0things",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0whatb0haveb0notb0things",
"conditionName": "what_have_not_things_qiwuno1_indep",
"compareOperator": "match-Include",
"valueRange": [
"不:今日多段谈计划",
"不:今日孤单计划",
"别:今日佛山计划"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
},
{
"semanticRelationName": "ruleb0gameb0collection",
"conditionName": "collection",
"compareOperator": "match-Include",
"valueRange": [
"游戏:收藏夹",
"收藏:收藏夹",
"放到:收藏夹",
"收藏:作品",
"要:收藏"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072368::ruleb0jutib0gameb0sentb0flower::监听[]的分支[送花具体]",
"size": 224744,
"sizeStr": "219.48KB",
"rate": "0.050572407",
"branchSize": 0,
"action": {
"id": 4072368,
"labelName": "监听[]的分支[送花具体]",
"branchName": "plot_listening",
"auxiliaryPriority": 11,
"priority": 1,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►送花:当前作品◄~",
"indexName": "ruleb0jutib0gameb0sentb0flower",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0jutib0gameb0sentb0flower",
"conditionName": "sent_flower_juti_games",
"compareOperator": "match-Include",
"valueRange": [
"送花:七日托大脚",
"送花:计划七日恋爱计划",
"送朵:7日拖车计划",
"送朵:七日推蛋计划"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072416::ruleb0whatb0haveb0notb0things::监听[]的分支[陈述之否定加名词+陈述之否定加动词]",
"size": 222872,
"sizeStr": "217.65KB",
"rate": "0.05015116",
"branchSize": 0,
"action": {
"id": 4072416,
"labelName": "监听[]的分支[陈述之否定加名词+陈述之否定加动词]",
"branchName": "plot_listening",
"auxiliaryPriority": 11,
"priority": 2,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►系统退出:当前作品◄~",
"indexName": "ruleb0whatb0haveb0notb0things",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0whatb0haveb0notb0things",
"conditionName": "what_have_not_things_qiwuno1_indep",
"compareOperator": "match-Include",
"valueRange": [
"不:今日多段谈计划",
"不:今日孤单计划",
"别:今日佛山计划"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
},
{
"semanticRelationName": "ruleb0notdob0whatb0v",
"conditionName": "notdo_what_v_qiwucance1_indep",
"compareOperator": "match-Include",
"valueRange": [
"不:要",
"不:想",
"不:用"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072371::ruleb0dob0whatb0vn::监听[]的分支[陈述之动宾]",
"size": 152104,
"sizeStr": "148.54KB",
"rate": "0.034226786",
"branchSize": 0,
"action": {
"id": 4072371,
"labelName": "监听[]的分支[陈述之动宾]",
"branchName": "plot_listening",
"auxiliaryPriority": 11,
"priority": 1,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►分享:当前作品◄~",
"indexName": "ruleb0dob0whatb0vn",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0dob0whatb0vn",
"conditionName": "do_what_vn_qiwushare1_indep",
"compareOperator": "match-Include",
"valueRange": [
"分享:其实多大计划",
"分享:即使脱单情话",
"分享:7日同单计划"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072382::ruleb0dob0whatb0vn::监听[]的分支[陈述之动宾]",
"size": 151536,
"sizeStr": "147.98KB",
"rate": "0.03409897",
"branchSize": 0,
"action": {
"id": 4072382,
"labelName": "监听[]的分支[陈述之动宾]",
"branchName": "plot_listening",
"auxiliaryPriority": 12,
"priority": 1,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►取消收藏:当前作品◄~",
"indexName": "ruleb0dob0whatb0vn",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0dob0whatb0vn",
"conditionName": "do_what_vn_qiwucance6_indep",
"compareOperator": "match-Include",
"valueRange": [
"删除:七日的三句话",
"取消:今日出的计划",
"取消:七日托安计划"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072372::ruleb0wantb0knownb0dob0what2::监听[]的分支[问句之动宾]",
"size": 151480,
"sizeStr": "147.93KB",
"rate": "0.034086373",
"branchSize": 0,
"action": {
"id": 4072372,
"labelName": "监听[]的分支[问句之动宾]",
"branchName": "plot_listening",
"auxiliaryPriority": 11,
"priority": 1,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►分享:当前作品◄~",
"indexName": "ruleb0wantb0knownb0dob0what2",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0wantb0knownb0dob0what2",
"conditionName": "want_known_do_what2_qiwushare2_indep",
"compareOperator": "match-Include",
"valueRange": [
"分享:其实多大计划",
"转发:七日拖太久",
"分享:7日同单计划"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072394::ruleb0gameb0exit::监听[]的分支[中控-退出]",
"size": 151480,
"sizeStr": "147.93KB",
"rate": "0.034086373",
"branchSize": 0,
"action": {
"id": 4072394,
"labelName": "监听[]的分支[中控-退出]",
"branchName": "plot_listening",
"auxiliaryPriority": 11,
"priority": 1,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►系统退出:当前作品◄~",
"indexName": "ruleb0gameb0exit",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0gameb0exit",
"conditionName": "exit",
"compareOperator": "match-Include",
"valueRange": [
"气质偷蛋计划:离开",
"七日涂炭计划:离开"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
},
{
"name": "4072389::ruleb0wantb0knownb0dob0what2::监听[]的分支[问句之动宾]",
"size": 151480,
"sizeStr": "147.93KB",
"rate": "0.034086373",
"branchSize": 0,
"action": {
"id": 4072389,
"labelName": "监听[]的分支[问句之动宾]",
"branchName": "plot_listening",
"auxiliaryPriority": 11,
"priority": 1,
"nextActionName": "",
"activeBranchNames": [],
"reply": "【晓悟@正常】►系统退出:当前作品◄~",
"indexName": "ruleb0wantb0knownb0dob0what2",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"return-0": "",
"match": ""
},
"historyPremise": [],
"currentPremise": [
{
"semanticRelationName": "ruleb0wantb0knownb0dob0what2",
"conditionName": "want_known_do_what2_qiwuquit1_indep",
"compareOperator": "match-Include",
"valueRange": [
"退出:7日荼谈企划",
"结束:今日托的计划",
"退出:7日多单任务"
],
"curCondition": true,
"preUpdate": false,
"type": 100,
"smapVar": "",
"omapVar": "",
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"updateKnowledge": {}
}
}
]
},
{
"name": "大战众天神",
"size": 1715336,
"sizeStr": "1.64MB",
"rate": "0.12272125",
"branchSize": 181,
"botAccount": "gz33botdazhanzhongtianshen1641779968",
"memoryCounts": [
{
"name": "4000091::emptySet::剧情2-10的分支[分支1-972479]",
"size": 6384,
"sizeStr": "6.23KB",
"rate": "0.7870366",
"branchSize": 0,
"action": {
"id": 4000091,
"labelName": "剧情2-10的分支[分支1-972479]",
"branchName": "plot_2-10",
"auxiliaryPriority": 8,
"priority": 3,
"nextActionName": "any_keyword",
"activeBranchNames": [
"queryskip*",
"plot_2-11"
],
"reply": "【背景图@正常】☛背景图:ID2-10☚~【特效@正常】☛背景特效:滑入:左右滑入☚~【背景图@正常】☛背景图:ID2-11☚~【旁白@正常】孙悟空一愣,只见二郎神突然之间变得像山一样高,顶天立地,手中端着三尖两刃刀,气势汹汹的杀了过来。",
"indexName": "emptySet",
"status": "waiting",
"varGroupAttrs": [],
"featureMap": {
"postQA": "http://localhost:59100/game",
"includeCurInfo": "",
"activate:after": "",
"match": "",
"activate": "",
"updateKnowledge": ""
},
"historyPremise": [
{
"semanticRelationName": null,
"conditionName": "任务线_任意地点进度",
"compareOperator": "match-Include",
"valueRange": [
"gz33botdazhanzhongtianshen1641779968_plot_2-10"
],
"curCondition": false,
"preUpdate": false,
"type": null,
"smapVar": null,
"omapVar": null,
"matchTypeAndOperator": [
"match",
"Include"
]
}
],
"currentPremise": [],
"updateKnowledge": {
"任务线任意地点最后的回答": "【背景图@正常】☛背景图:ID2-10☚~【特效@正常】☛背景特效:滑入:左右滑入☚~【背景图@正常】☛背景图:ID2-11☚~【旁白@正常】孙悟空一愣,只见二郎神突然之间变得像山一样高,顶天立地,手中端着三尖两刃刀,气势汹汹的杀了过来。",
"globalVariable_无匹配回答次数": "0",
"2-11": "1",
"2-10": "+1",
"plot_jump_text": "str+【背景图@正常】☛背景图:ID2-10☚~【特效@正常】☛背景特效:滑入:左右滑入☚~【背景图@正常】☛背景图:ID2-11☚~【旁白@正常】孙悟空一愣,只见二郎神突然之间变得像山一样高,顶天立地,手中端着三尖两刃刀,气势汹汹的杀了过来。",
"任务线_任意地点进度": "gz33botdazhanzhongtianshen1641779968_plot_2-11",
"任务线任意地点最后一个condition": "any_keyword",
"site": "任意地点",
"game_step": "gz33botdazhanzhongtianshen1641779968_plot_2-11",
"临时变量condition": "any_keyword",
"临时变量reply": "var={reply-3}",
"globalVariable_问答匹配次数": "0",
"unknownText": "",
"globalVariable_无匹配意图次数": "0"
}
}
}
]
}
]
}
}
</code>
```
</details>
### Response中data参数说明
| 参数名 | 示例值 | 参数描述 |
| --- | --- | --- |
| code | 1 | 返回的状态码 |
| message | 成功 | 返回的状态信息 |
| data | “” | 返回的数据 |
## 8.计算所有bot内存占用
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/meminfo/bot
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:计算所有bot内存占用,并统计最大,最小,平均值
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/meminfo/bot'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| 无 | 无 | 无 | 无 | 无 |
> 响应示例
正确响应
```
agsl
{
"code": 1,
"msg": "成功",
"data": {
"botMaxMemId": "手表推荐txgz14botshoubiaotuijian0130373633996",
"botMaxMemSize": "10.80MB",
"botMinMemId": "手表中控gz25botshoubiaozhongkong090274765560",
"botMinMemSize": "6.19MB",
"botAverageMemSize": "8.49MB",
"botSize": 2,
"botTotalMemSize": "16.99MB"
}
}
```
### Response中data参数说明
| 参数名| 数据类型 | 示例值 | 参数描述 |
| --- |---| --- | --- |
| code| int | 1 | 返回的状态码 |
| message| String | 成功 | 返回的状态信息 |
| data| MemInfoBO | memInfoBO | 返回的数据 |
| memInfoBO.botMaxMemId| String | 手表推荐txgz14botshoubiaotuijian0130373633996 | 最大内存占用的bot id |
| memInfoBO.botMaxMemSize| String | 10.80MB | 最大内存占用的bot的人性化展示内存大小 |
| memInfoBO.botMinMemId| String| 手表中控gz25botshoubiaozhongkong090274765560 | 最小内存占用的bot id |
| memInfoBO.botMinMemSize| String| 6.19MB | 最小内存占用的bot的人性化展示内存大小 |
| memInfoBO.botAverageMemSize| String| 8.49MB | 每个bot平均内存大小 |
| memInfoBO.botSize| Long | 2 | bot 的数量 |
| memInfoBO.botTotalMemSize| String | 16.99MB | 总的内存占用人性化的展示 |
## 9.计算chatkey缓存和用户缓存的内存占用大小
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/meminfo/cache
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:计算chatkey缓存和用户缓存的内存占用大小, 最大, 最小, 平均
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/api/bot/info/jamm/meminfo/cache'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| 无 | 无 | 无 | 无 | 无 |
> 响应示例
正确响应
```
agsl
{
"code": 1,
"msg": "成功",
"data": {
"shareVarMinMemSize": "0B",
"shareVarMaxMemSize": "0B",
"shareVarTotalMemSize": "0B",
"shareVarCount": 1,
"shareVarAverageMemSize": "0B"
}
}
```
### Response中data参数说明
| 参数名 | 数据类型 | 示例值 | 参数描述 |
| --- |---| --- | --- |
| code | int | 1 | 返回的状态码 |
| message| String | 成功 | 返回的状态信息 |
| data | MemInfoBO | memInfoBO | 返回的数据 |
| memInfoBO.shareVarMinUid| String | 无 | 最小内存占用的uid |
| memInfoBO.shareVarMinMemSize| String | 0B | 最小内存占用用户变量对象内存大小 |
| memInfoBO.shareVarMaxUid| String | 无 | 最大内存占用的uid |
| memInfoBO.shareVarMaxMemSize| String | 0B | 最大内存占用的内存大小 |
| memInfoBO.shareVarTotalMemSize| String | 0B | 用户变量对象总的内存占用 |
| memInfoBO.shareVarCount| long | 1 | 用户变量对象数量 |
| memInfoBO.shareVarAverageMemSize| String | 0B | 用户变量对象的平均内存占用大小 |
## 10.获取当前节点服务的信息
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/system/service/info?secret=f1fvo0Yhw199PIHWTmCbbQ
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:获取当前节点服务的信息,方便开发者看运行状态
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/system/service/info?secret=f1fvo0Yhw199PIHWTmCbbQ'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| secret | String | f1fvo0Yhw199PIHWTmCbbQ | 是 | 秘钥 |
> 响应示例
正确响应
```
agsl
{
"code": 1,
"message": "成功",
"data": {
"reportChatruntimeServerInfo": {
"totalChatKeyCount": 0,
"botAccountSet": [
"gz25bottousujianyi0701758402467",
"txgz12botyiguzuoqi0529018581811",
"txgz12botfanjinzhongju0616599141847"
],
"hostPort": "10.0.7.5:8081",
"loadMemoryBotSize": 0,
"updateTime": 1698907341012
},
"reportBotInfoList": [],
"errorChatSize": 0
}
}
```
### Response中data参数说明
| 参数名 | 数据类型 | 示例值 | 参数描述 |
| --- | --- | --- | --- |
| code | int | 1 | 返回的状态码 |
| message | String | 成功 | 返回的状态信息 |
| data | JSONObject | | 返回的数据 |
| reportChatruntimeServerInfo | ChatruntimeServerInfoBO | reportChatruntimeServerInfo | 服务信息 |
| reportChatruntimeServerInfo.totalChatKeyCount | int | 0 | 总的chatKey数量 |
| reportChatruntimeServerInfo.botAccountSet | Set
<
String
>
| | 包含的botAccount集合 |
| reportChatruntimeServerInfo.hostPort | String | 10.0.7.5:8081 | 当前服务的host和port,用冒号拼接 |
| reportChatruntimeServerInfo.loadMemoryBotSize | Integer | 0 | 加载内存中的bot数量 |
| reportChatruntimeServerInfo.updateTime | String | 1698907341012 | 信息的更新时间 |
| reportBotInfoList | List
<
JSONObject
>
|
\[\]
| 注册的bot信息列表 |
| errorChatSize | int | 0 | 错误的chat数量 |
## 11.更新当前服务的状态
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/system/server?status=1&secret=f1fvo0Yhw199PIHWTmCbbQ
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:更新当前服务的状态。上线后,注册负载均衡,然后才能开始服务,如果没调用这接口上线,不会开启服务。
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/system/server?status=1&secret=f1fvo0Yhw199PIHWTmCbbQ'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| secret | String | f1fvo0Yhw199PIHWTmCbbQ | 是 | 秘钥 |
| status | String | 1 | 是 | 0: 表示下线 1: 表示上线 |
> 响应示例
正确响应
```
agsl
{
"code": 1,
"message": "成功",
"data": null
}
```
### Response中data参数说明
| 参数名 | 示例值 | 参数描述 |
| --- | --- | --- |
| code | 1 | 返回的状态码 |
| message | 成功 | 返回的状态信息 |
| data | null | 返回的数据 |
> 验证方法
所在服务器输入指令
`tail -f -n 100 /home/jiaoyou/projects/chatruntime/statistic_info.log`
查看chatruntime的对话数,其中ChatCacheMapSize是chatkey的个数。
## 12.配置重新加载
> 基本信息
-
接口状态: 已完成
-
生成剧情接口url:http://tx-gz10.heyqiwu.cn/chatruntime/system/config/reload?secret=f1fvo0Yhw199PIHWTmCbbQ
-
请求方式:GET
-
Content-Type: application/json;charset=UTF-8
-
功能描述:配置重新加载。改的BaseConfig的值
-
请求指令:
```
curl --location 'http://tx-gz10.heyqiwu.cn/chatruntime/system/config/reload?secret=f1fvo0Yhw199PIHWTmCbbQ'
```
> 请求参数
接口请求参数见下表
### Body参数说明
| 参数名 | 数据类型 | 示例值 | 是否必填 | 参数描述 |
| --- | --- | --- | --- | --- |
| secret | String | f1fvo0Yhw199PIHWTmCbbQ | 是 | 秘钥 |
> 响应示例
-
正确响应
`success`
-
正确响应
`傻孩子`
### Response中data参数说明
| 参数名 | 示例值 | 参数描述 |
| --- | --- | --- |
| data | success | 返回的数据 |
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment