**测试环境URL**:http://tx-gz14.heyqiwu.cn **生产环境URL**:http://tx-gz11.heyqiwu.cn [TOC] ### 获取生成的状态 **METHOD**: GET **path**: api/platform/design/generate/state **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | --------- | ------ | -------- | ----------- | | projectId | number | yes | 项目ID | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/generate/state/?projectId=6381' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURJeU5UZzBNVGtzSW1WNGNDSTZNVGN3TWpJMk5UWXhPU3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLkJTYXpJNzV0RHJLQU94WGdVYXRPNUdTcWYyLTcySmZ2RHJoM3MybjRFQ0E6czAwcGVyczNjcmV0' \ -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: txgz14botwww853177949' \ -H 'groupId: 713' \ -H 'mul: true' \ -H 'projectId: 6381' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": false } ``` ### 对话 **METHOD**: POST **path**: api/platform/chat/api/voiceTestChat **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求body字段说明 | key | type | required | description | | ---------- | ------- | -------- | -------------- | | userId | string | no | client_id | | message | string | yes | 输入的内容 | | chatKey | string | yes | 聊天key | | nickname | string | yes | 昵称 | | botAccount | string | yes | 在引擎中的帐号 | | audio | boolean | yes | 音频 | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/chat/api/voiceTestChat' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic OnMwMHBlcnMzY3JldA==' \ -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' \ --data-raw '{"userId":"","message":"1\n","chatKey":"VGOJ6oal8IUarP9QPimy","nickname":"visitor","botAccount":"txgz14botwww853177949","audio":false}' \ --compressed \ --insecure ``` #### 响应实例 ```json { "msg": "SUCCESS", "code": 1, "dialogList": [ { "npcName": "周逸生", "text": "你也是去提交资料的吗?我记得你,你是在研讨会上精准提问,被学校当成招生宣传片片段的女生。", "audio": "" }, { "npcName": "旁白", "text": "本是盯着他手里的那张资料,目光却偏了,落在他的身上。", "audio": "" } ], "botPostData": null, "chatKey": "VGOJ6oal8IUarP9QPimy", "plotImgUrl": null, "logs": [ { "originText": "1", "distVariables": [ { "name": "系统源剧情点", "share": false, "value": "800-1" }, { "name": "用户重复回复次数", "share": false, "value": "0" } ], "updateVars": [], "chatKey": "VGOJ6oal8IUarP9QPimy", "originVariables": [ { "name": "系统源剧情点", "share": false, "value": "800-1" }, { "name": "用户重复回复次数", "share": false, "value": "0" } ], "matchedBranchs": [ { "note": "剧情800-1的分支[分支3-680272]", "satisfy": true, "show": true, "actionId": 4000001, "conditionPriority": 3, "matchedConditions": [ { "currentConditionSO": [ "txgz14botwww853177949_plot_800-1" ], "valueRange": [ "txgz14botwww853177949_plot_800-1" ], "description": null, "conditionName": null, "semanticRelationName": null, "operator": "match-Include" }, { "currentConditionSO": [ "任意地点" ], "valueRange": [ "任意地点" ], "description": null, "conditionName": null, "semanticRelationName": null, "operator": "match-Include" }, { "currentConditionSO": [ "1" ], "valueRange": [ "1" ], "description": null, "conditionName": null, "semanticRelationName": null, "operator": "number-BiggerOrEqual" } ], "execute": true, "auxiliaryPriority": 8 }, { "note": "剧情800-1-3的合并剧情", "satisfy": true, "show": true, "actionId": 4000114, "conditionPriority": 3, "matchedConditions": [ { "currentConditionSO": [ "txgz14botwww853177949_plot_800-1-3" ], "valueRange": [ "txgz14botwww853177949_plot_800-1-3" ], "description": null, "conditionName": null, "semanticRelationName": null, "operator": "match-Include" }, { "currentConditionSO": [ "任意地点" ], "valueRange": [ "任意地点" ], "description": null, "conditionName": null, "semanticRelationName": null, "operator": "match-Include" }, { "currentConditionSO": [ "1" ], "valueRange": [ "1" ], "description": null, "conditionName": null, "semanticRelationName": null, "operator": "number-BiggerOrEqual" } ], "execute": true, "auxiliaryPriority": 10 } ], "conditionNameSoSet": { "unknownText_backup": [], "unknownText": [] }, "distPlotNum": "800-2", "doLastProcess": false, "originPlotNum": "800-1", "queryText": "1", "queryPos": "", "matchedConditions": [], "logStr": null, "botAccount": "txgz14botwww853177949", "reply": "【周逸生@正常】你也是去提交资料的吗?我记得你,你是在研讨会上精准提问,被学校当成招生宣传片片段的女生。【旁白@正常】本是盯着他手里的那张资料,目光却偏了,落在他的身上。【旁白@正常】男生气质出挑,眉目清秀,那一身简单的白色衣裤衬得他极为清隽。你没来得及反应过来,已经对上他那双眸子。【周逸生@正常】给你。►SEND_CC_DATA{\"priority\":8}SEND_CC_DATA◄", "mapIntents": [] } ], "bgmUrl": null } ``` ### 获取对话作品信息 **METHOD**: GET **path**: api/platform/design/api/works **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | ----------------- | ------ | -------- | -------------- | | include | string | yes | 包含内容 | | aipioneerUsername | string | yes | 在引擎中的帐号 | include值说明 | key | type | description | | ------------- | ------ | ----------- | | worksName | string | 作品名 | | authorName | string | 作品姓名 | | npcHeadImgUrl | string | 角色头像 | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/api/works?include=worksName,authorName,npcHeadImgUrl&aipioneerUsername=txgz14botwww853177949' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURJeU5UZzBNVGtzSW1WNGNDSTZNVGN3TWpJMk5UWXhPU3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLkJTYXpJNzV0RHJLQU94WGdVYXRPNUdTcWYyLTcySmZ2RHJoM3MybjRFQ0E6czAwcGVyczNjcmV0' \ -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: txgz14botwww853177949' \ -H 'groupId: 713' \ -H 'mul: true' \ -H 'projectId: 6381' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": { "worksName": "w", "authorName": null, "intro": null, "worksBannerImgUrl": "", "chatUrl": "http://tx-gz14.heyqiwu.cn:8070/api/voiceTestChat", "npcHeadImgUrl": { "旁白": "", "周逸生": "", "王珊": "", "关越闻": "", "公司老总": "", "总管": "", "指令系统": "" } } } ``` ###