问答干预查询
1.问答干预信息接口
接口说明
- 查看某个干预详情时,可以通过两种方式查询:干预答案的ID或者干预问题列表中,其中一个问题的ID
请求方式
- 请求方法: POST
- 请求 URL: /v1/ctai/ctai_qaintv_info
- Content-Type: application/json
请求参数
{ "ctqaintva_id": "test", "ctqaintvq_id": "test", }
参数 | 类型 | 必需 | 参数说明 |
---|---|---|---|
ctqaintva_id | string | 否 | 此参数和 ctqaintvq_id 二选一,干预答案 id |
ctqaintvq_id | string | 否 | 此参数和 ctqaintva_id 二选一,干预问题 id |
应答业务参数
{ "ctqaintva_id": "tset_id", // 问答干预 id "ctai_qaintv_answer": { "ctqaintva_id": "tset_id", "scope_type": "character", "scope_id": "test", "ctype": "1", // 内容类型. 1: 文本 | 2: 图片 "content": "test", // 干预答案内容 "approval_status": "pass", // 审核状态 // init:待审核 // pass:审核通过 // reject:审核拒绝 "source_type": "userqa", // 来源。 // userqa: 用户输入的 qa // batchqa: 批量添加 qa // autoqa: 自动生成 qa // interv: 干预 // 空:未知 "source_name": "test_name", // 来源的名称 "source_ctdoc_id": "test_id", // 来源的文档 id "media": { // 媒体资源,可能为 null "image": [ // 图片列表,可能不存在此属性,可能为空数组 { "file_id": "test.png", // 通过文件上传接口获取到的 file_id "file_url": "https://test.com/test.png", // 图片 url "width": 100, // 图片宽度,单位是像素,如果没有设置宽度则为 -1 "height": 200 // 图片高度,单位是像素,如果没有设置高度则为 -1 }, // 其他图片 ] }, "followup_question": [ // 推荐问题列表 { "content": "test1" // 推荐问题内容 }, // 其他推荐问题 ], "word_count": "100", // 问题和答案的总字数 "create_time": "1684747563", // 创建时间 "update_time": "1684747639" // 最后更新时间 }, "ctai_qaintv_question_list": [ // 干预问题列表 { "ctqaintvq_id": "tset_id", "ctai_qaintv_question": { "ctqaintvq_id": "tset_id", // 问题问题 id "qaintvq_digest": "test", "content": "test", // 干预问题内容 "create_time": "1684740411", // 创建时间 "update_time": "1684740411" // 最后更新时间 } }, // 其他干预问题 ], "ctai_character": [ // 所属项目,只获取第一个即可 { // 项目信息对象,详见项目信息接口的 ctai_character 对象说明 } ] }
- 一个答案对应多个问题,但每个答案(ctqaintva_id)和每个问题(ctqaintvq_id)都有各自的ID
参数 | 类型 | 参数说明 |
---|---|---|
ctqaintva_id | string | 问答干预 id(干预答案 id) |
ctai_qaintv_answer | object | 干预问题信息对象 |
followup_question | array | 推荐问题列表 |
ctai_qaintv_question_list | array | 干预问题列表 |
ctqaintvq_id | string | 干预问题 id |
content | string | 干预问题或干预答案内容 |
create_time | string | 创建时间,整数时间戳,单位是秒。 |
update_time | string | 修改时间,整数时间戳,单位是秒。 |
2.问答干预列表接口
请求方式
- 请求方法: POST
- 请求 URL: /v1/ctai/ctai_qaintv_list
- Content-Type: application/json
请求参数
{ "ctqaintva_id": "test", "ctqaintvq_id": "test", "filter_qa_question_content": "test", "filter_qa_answer_content": "test", "filter_qa_keywords": "test", "sort_type": "create_time_asc", "page": "1", "page_rows": "1" }
参数 | 类型 | 必需 | 参数说明 |
---|---|---|---|
ctqaintva_id | string | 否 | 干预答案 id,多个用英文逗号分隔 |
ctqaintvq_id | string | 否 | 干预问题 id,多个用英文逗号分隔 |
filter_qa_question_content | string | 否 | 问答干预的问题搜索关键字,模糊匹配 |
filter_qa_answer_content | string | 否 | 问答干预的答案搜索关键字,模糊匹配 |
filter_qa_keywords | string | 否 | 问答干预的问题或答案搜索关键字,模糊匹配 |
sort_type | string | 否 | 排序方式,默认是 create_time_asc create_time_asc 按照创建时间由旧到新排序 create_time_desc 按照创建时间由新到旧排序 update_time_asc 按照修改时间由旧到新排序 update_time_desc 按照修改时间由新到旧排序 |
page | string | 否 | 分页参数,第几页,从 1 开始,默认是 1 |
page_rows | string | 否 | 分页参数,每页多少条,默认是 1 |
应答业务参数
{ "total_count": "3", "ctai_qaintv_list": [ { "ctqaintva_id": "tset_id", "approval_status": "pass", // 审核状态 // init:待审核 // pass:审核通过 // reject:审核拒绝 "ctai_qaintv_answer": { "ctqaintva_id": "tset_id", "content": "test", "followup_question": [ { "content": "test1" }, // 其他推荐问题 ], "create_time": "1684747563", "update_time": "1684747639" }, "ctai_qaintv_question_list": [ { "ctqaintvq_id": "tset_id", "ctai_qaintv_question": { "ctqaintvq_id": "tset_id", "content": "test", "create_time": "1684740411", "update_time": "1684740411" } }, // 其他干预问题 ] }, // 其他问答干预 ] }
参数 | 类型 | 参数说明 |
---|---|---|
total_count | string | 问答干预总数量,用于分页。 |
ctai_qaintv_list | array | 问答干预列表 |