一、 APAAS提交文档识别任务
接口地址:http://doc-extract.apaas-work.svc.cluster.local/docextract/add
入参
| 字段名 | 字段类型 | 说明 |
|---|---|---|
| filePath | string | 文件地址:https://xxx.xx.com/xx/x.pdf |
| docID | string | 文档ID:id001 |
| domain | string | 跟域名:jstest.aodianyun.cn |
| uin | string | 用户uin:1011 |
| callbackURL | string | 结果回调地址(可选):https://xxx.com/result |
返回示例
{
"QID": "9c3ac86d292f34cc4be119e07f8f4e2b",
"flag": 100,
"flagString": "success"
}
二、 (ai录题)任务完成回调 /studentWork/console/addData
接口地址:http://apaas-tool.apaas-tool.svc.cluster.local/studentWork/console/addData
入参
| 字段名 | 字段类型 | 说明 |
|---|---|---|
| QID | string | 任务ID |
| flag | int | 任务执行结果: 100 成功,其他失败(101 文档不存在,102 上传资源失败等) |
| flagString | string | 结果描述 |
| data | array | 解析数据 |
| —content | string | 题干 |
| —answer | string | 回答内容 |
| —trueAnswer | string | 正确答案 |
| —analysis | string | 题目分析 |
| —type | int | 题目类型 1单选 2多选 3判断 4 填空 5简答 |
| —score | float | 分值 |
data入参数示例
[
{
"content": "<p>12ddd</p>",
"answer": "{\"annexList\":[],\"question\":[{\"label\":\"A\",\"value\":\"A\"}]}",
"trueAnswer": "\"错误\"",
"analysis": "",
"type": 3,
"score": 0.5,
},
{
"content": "<p>12ddd</p>",
"answer": "{\"annexList\":[],\"question\":[{\"label\":\"A\",\"value\":\"A\"}]}",
"trueAnswer": "\"错误\"",
"analysis": "",
"type": 2,
"score": 1.0,
}
]
三、 清空图片、md资源,在ai分析结果完全未被采纳时候调用
接口地址:接口地址:http://doc-extract.apaas-work.svc.cluster.local/docextract/delete
入参
| 字段名 | 字段类型 | 说明 |
|---|---|---|
| docID | string | 文档ID:id001 |
| uin | string | 用户uin:1011 |
返回示例
{
"flag": 100,
"flagString": "success"
}
四、 获取任务状态
接口地址:接口地址:http://doc-extract.apaas-work.svc.cluster.local/docextract/getstatus
POST方式请求
入参
| 字段名 | 字段类型 | 说明 |
|---|---|---|
| docIDs | arrary | 文档ID列表:[id001,id002] |
返回示例
{
"flag": 100,
"flagString": "success"
"data":{
"id001":{
"percent":0.5 ,// 进度百分比,小数
"notifyCode":0,//任务通知状态,-1:未回调任务进行中; 0:失败 ,1 成功
"status":3, //不通阶段,分别有下载、转pdf、pdf识别、大模型失败、上传图片等
"addTime":1729571409.1035187//
},
"id001":null //任务不存在就返回null,
}
}作者:张光博 创建时间:2024-10-12 09:30
最后编辑:xueyueming 更新时间:2024-10-22 17:59
最后编辑:xueyueming 更新时间:2024-10-22 17:59