From c8ef6466d855e89fe7096a3eed7d672e1eeaf4dc Mon Sep 17 00:00:00 2001 From: jixudong Date: Thu, 14 Dec 2023 18:25:06 +0800 Subject: [PATCH] Replace 项目列表-问答.md --- gameditor/前端接口/项目列表-问答.md | 264 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------- 1 file changed, 197 insertions(+), 67 deletions(-) diff --git "a/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\227\256\347\255\224.md" "b/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\227\256\347\255\224.md" index 1731b5c..f53a7be 100644 --- "a/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\227\256\347\255\224.md" +++ "b/gameditor/\345\211\215\347\253\257\346\216\245\345\217\243/\351\241\271\347\233\256\345\210\227\350\241\250-\351\227\256\347\255\224.md" @@ -14,9 +14,9 @@ #### 请求path字段说明 -| key | type | required | description | -| ------ | ---- | -------- | ----------- | -| plotId | | yes | 剧情点ID | +| key | type | required | description | +| ------ | ------ | -------- | ----------- | +| plotId | number | yes | 剧情点ID | #### 请求param字段说明 @@ -81,9 +81,9 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/plot/qa/1914361/' \ #### 请求path字段说明 -| key | type | required | description | -| ------ | ---- | -------- | ----------- | -| plotId | | yes | 剧情点id | +| key | type | required | description | +| ------ | ------ | -------- | ----------- | +| plotId | number | yes | 剧情点id | #### 请求param字段说明 @@ -93,21 +93,21 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/plot/qa/1914361/' \ #### 请求body字段说明 -| key | type | required | description | -| -------- | ---- | -------- | ----------- | -| id | | yes | 主键ID | -| question | | yes | 问题内容 | -| fType | | yes | 无效字段 | -| answer | | yes | 已弃用 | +| key | type | required | description | +| -------- | ------ | -------- | ----------- | +| id | number | yes | 主键ID | +| question | string | yes | 问题内容 | +| fType | number | yes | 无效字段 | +| answer | object | yes | 回答 | answer值说明 -| key | type | description | -| ------- | ---- | ----------- | -| content | | 回答内容 | -| npcId | | 角色id | -| npcName | | 角色名称 | -| mood | | 情绪 | +| key | type | description | +| ------- | ------ | ----------- | +| content | string | 回答内容 | +| npcId | number | 角色id | +| npcName | string | 角色名称 | +| mood | string | 情绪 | #### 请求示例 @@ -141,7 +141,7 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/plot/qa/1914361/' \ } ``` -### 上传qa数据 +### 上传问答文件 **METHOD**: POST @@ -157,10 +157,10 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/plot/qa/1914361/' \ #### 请求body字段说明 form data -| key | type | required | description | -| --------- | ---- | -------- | ------------- | -| file | | yes | 问答excel文件 | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ------------- | +| file | excel | yes | 问答excel文件 | +| projectId | number | yes | 项目id | #### 请求示例 @@ -193,7 +193,7 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/qa/upload' \ } ``` -### 导出qa数据 +### 下载问答 **METHOD**: GET @@ -203,10 +203,10 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/qa/upload' \ #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目ID | -| plotId | | yes | 剧情ID | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目ID | +| plotId | number | yes | 剧情ID | #### 请求body字段说明 @@ -258,7 +258,7 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/qa/export?projectId=1&plotId } ``` -### 获取通用QA +### 获取通用问答 **METHOD**: GET @@ -268,11 +268,11 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/qa/export?projectId=1&plotId #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目ID | -| pageSize | | yes | 页面数据量 | -| pageNum | | no | 页码 | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目ID | +| pageSize | number | yes | 页面数据量 | +| pageNum | number | no | 页码 | #### 请求body字段说明 @@ -331,7 +331,7 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/generalQA?projectId=1&pageSi } ``` -### 获取全局qa数据 +### 获取全局问答数据 **METHOD**: GET @@ -341,9 +341,9 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/generalQA?projectId=1&pageSi #### 请求path字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | #### 请求param字段说明 @@ -407,9 +407,9 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/generalQA/1/' \ #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | #### 请求body字段说明 @@ -512,11 +512,11 @@ curl 'http://tx-gz11.heyqiwu.cn/api/platform/design/system/qa/all?projectId=3165 #### 请求body字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| id | | yes | 问答id | -| answer | | yes | 回答 | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| id | number | yes | 问答id | +| answer | string | yes | 回答 | +| projectId | number | yes | 项目id | #### 请求示例 @@ -561,9 +561,9 @@ curl 'http://tx-gz11.heyqiwu.cn/api/platform/design/system/qa/tmpl' \ #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | #### 请求body字段说明 @@ -612,9 +612,9 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/system/qa/all/enable?project #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | #### 请求body字段说明 @@ -663,15 +663,15 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/system/qa/all/disable?projec #### 请求path字段说明 -| key | type | required | description | -| ---- | ---- | -------- | -------------- | -| id | | yes | 系统问答主键ID | +| key | type | required | description | +| ---- | ------ | -------- | -------------- | +| id | number | yes | 系统问答主键ID | #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | #### 请求body字段说明 @@ -721,15 +721,15 @@ curl 'http://tx-gz11.heyqiwu.cn/api/platform/design/system/qa/%20126845/enable?p #### 请求path字段说明 -| key | type | required | description | -| ---- | ---- | -------- | -------------- | -| id | | yes | 系统问答主键ID | +| key | type | required | description | +| ---- | ------ | -------- | -------------- | +| id | number | yes | 系统问答主键ID | #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | #### 请求body字段说明 @@ -779,9 +779,9 @@ curl 'http://tx-gz11.heyqiwu.cn/api/platform/design/system/qa/126845/disable?pro #### 请求param字段说明 -| key | type | required | description | -| --------- | ---- | -------- | ----------- | -| projectId | | yes | 项目id | +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | #### 请求body字段说明 @@ -837,4 +837,134 @@ curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/qa/score?projectId=6381' \ } ``` +### 获取兜底回答 + +**METHOD**: GET + +**path**: api/platform/design/npc/instance/unknown_text/{projectId}/ + +**RequestHeaders:** 同创作平台请求header + +#### 请求path字段说明 + +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | + +#### 请求param字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求body字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求示例 + +```js +curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/npc/instance/unknown_text/1/' \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Accept-Language: zh-CN,zh;q=0.9' \ + -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFd05qZzVOekVzSW1WNGNDSTZNVGN3TVRBM05qRTNNU3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLlpLUS10eDBDUHkweklNT1haTkxSWWxFaElCcU8zMHJPUGw1eUZMeWdRVkk6czAwcGVyczNjcmV0' \ + -H 'Connection: keep-alive' \ + -H 'Origin: http://localhost:8080' \ + -H 'Referer: http://localhost:8080/' \ + -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ + -H 'botAccount: 6080626246' \ + -H 'groupId: 76' \ + -H 'mul: true' \ + -H 'projectId: 1' \ + --compressed \ + --insecure +``` + +#### 响应实例 + +```json +{ + "code": 1, + "msg": "成功", + "data": [ + { + "id": null, + "unknownText": "不好意思,我没听懂你在说什么\n我没明白你的意思,能不能换个说法啊\n不是很明白您的意思,求您换个表达方式吧", + "npcName": "总的无匹配文本", + "status": 1 + }, + { + "id": 145382, + "unknownText": "不好意思,我没听懂你在说什么\n我没明白你的意思,能不能换个说法啊\n不是很明白您的意思,求您换个表达方式吧", + "npcName": "家丁", + "status": 0 + } + ] +} +``` + +### 修改兜底回答 + +**METHOD**: PUT + +**path**: api/platform/design/npc/instance/unknown_text/{projectId}/ + +**RequestHeaders:** 同创作平台请求header + +#### 请求path字段说明 + +| key | type | required | description | +| --------- | ------ | -------- | ----------- | +| projectId | number | yes | 项目id | + +#### 请求param字段说明 + +| key | type | required | description | +| ---- | ---- | -------- | ----------- | +| 无 | | | | + +#### 请求body字段说明 + +| key | type | required | description | +| -------------- | ------ | -------- | ---------------------------------- | +| id | number | no | 回答id | +| npcName | string | yes | 角色名称 | +| oneUnknownText | string | yes | 第一条回答 | +| status | number | yes | 1代表总的无匹配文本,0代表其他角色 | +| unknownText | string | yes | 回答 | + +#### 请求示例 + +```js +curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/npc/instance/unknown_text/1/' \ + -X 'PUT' \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Accept-Language: zh-CN,zh;q=0.9' \ + -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFd05qZzVOekVzSW1WNGNDSTZNVGN3TVRBM05qRTNNU3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLlpLUS10eDBDUHkweklNT1haTkxSWWxFaElCcU8zMHJPUGw1eUZMeWdRVkk6czAwcGVyczNjcmV0' \ + -H 'Connection: keep-alive' \ + -H 'Content-Type: application/json;charset=UTF-8' \ + -H 'Origin: http://localhost:8080' \ + -H 'Referer: http://localhost:8080/' \ + -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ + -H 'botAccount: 6080626246' \ + -H 'groupId: 76' \ + -H 'mul: true' \ + -H 'projectId: 1' \ + --data-raw '[{"id":null,"unknownText":"不好意思,我没听懂你在说什么\n我没明白你的意思,能不能换个说法啊\n不是很明白您的意思,求您换个表达方式吧","npcName":"总的无匹配文本","status":1,"oneUnknownText":"不好意思,我没听懂你在说什么......"},{"id":145382,"unknownText":"不好意思,我没听懂你在说什么\n我没明白你的意思,能不能换个说法啊\n不是很明白您的意思,求您换个表达方式吧","npcName":"家丁","status":0,"oneUnknownText":"不好意思,我没听懂你在说什么......"}]' \ + --compressed \ + --insecure +``` + +#### 响应实例 + +```json +{ + "code": 1, + "msg": "成功", + "data": null +} +``` + ### \ No newline at end of file -- libgit2 0.27.1