1.添加问答干预接口
- 每次添加干预问题时,可以添加多种问法,对应一个答案。例如下面关于二路公交车的问答干预。
请求方式
- 请求方法: POST
- 请求 URL: /v1/ctai/add_ctai_qaintv
- Content-Type: application/json
请求参数
{
"ctai_qaintv": {
"ctai_qaintv_question_list": [
{
"content": "二路公交车在哪里坐?"
},{
"content": "二路公家车的站台在哪里?"
},{
"content": "二路公交车在几楼?"
},
// 其他干预问题
],
"ctai_qaintv_answer": {
"source_type": "userqa", // 来源。两个值:userqa 和 interv。分别是用户输入的问题和干预问题。
"media": { // 可选,媒体资源
"image": [ // 可选,图片列表
{
"file_id": "erluqiche.png", // 必传,通过“通用文件上传接口”获取到的 file_id
"width":100, // 必传,图片宽度,单位是像素
"height":200 // 必传,图片高度,单位是像素
},
// 其他图片
]
},
"content": "二路公交车在8楼,去8楼坐二路汽车", // 必传,干预答案内容
"source_answer_content": "二路汽车在8楼乘车", // 可选,被干预的原始回答
"followup_question": [
{
"content": "三路公交车在几楼?"
},{
"content": "8楼还有哪些公交车到"
},
// 其他推荐问题
]
}
}
}
参数 | 类型 | 必需 | 参数说明 |
---|
ctai_qaintv | object | 是 | 问答干预信息对象 |
ctai_qaintv_answer | object | 是 | 干预答案信息对象 |
followup_question | array | 是 | 推荐问题列表 |
ctai_qaintv_question_list | array | 是 | 干预问题列表 |
content | string | 是 | 干预问题或干预答案内容 |
应答业务参数
{
"ctqaintva_id": "test_id"
}
参数 | 类型 | 参数说明 |
---|
ctqaintva_id | string | 干预答案的 id |
2.删除问答干预接口
请求方式
- 请求方法: POST
- 请求 URL: /v1/ctai/delete_ctai_qaintv_batch
- Content-Type: application/json
请求参数
{
"ctqaintva_id": "test_id1,test_id2,test_id3"
}
参数 | 类型 | 必需 | 参数说明 |
---|
ctqaintva_id | string | 是 | 必传,干预答案 id,多个用英文逗号分隔 |
应答业务参数