import { get, post, deletes, put } from '@/http/index'

// 查看抽取任务列表
export const getTaskList = async (data) => {
  return await get('/als/kGraphTask/list', data)
}

// 新增任务
export const addTask = async (data) => {
  return await post('/als/kGraphTask', data)
}

// 修改任务
export const updateTask = async (data) => {
  return await put('/als/kGraphTask', data)
}

// 删除任务
export const removeTask = async (id) => {
  return await deletes('/als/kGraphTask/' + id)
}

// 获取文件信息
export const getTaskInfo = async (id) => {
  return await get('/als/kGraphTask/' + id)
}

// 执行知识图谱的类型
export const taskPro = async (data) => {
  return await post('/als/kGraphTask/pro', data)
}

// 获取分句列表
export const getClauseList = async (data) => {
  return await get('/als/kGraphClause/list', data)
}

// 获取分句详细信息
export const getClauseInfo = async (id) => {
  return await get('/als/kGraphClause/' + id)
}

// 删除分句
export const removeClause = async (id) => {
  return await deletes('/als/kGraphClause/' + id)
}

// 修改分句
export const updateClause = async (data) => {
  return await put('/als/kGraphClause', data)
}

// 获取抽取列表
export const getExtractList = async (data) => {
  return await get('/als/kGraphEntity/list', data)
}

// 修改抽取结果
export const updateExtractInfo = async (data) => {
  return await put('/als/kGraphEntity', data)
}

// 删除抽取结果
export const removeExtractInfo = async (id) => {
  return await deletes('/als/kGraphEntity/' + id)
}

// 新增实体关系
export const addER = async (data) => {
  return await post('/als/kGraphEntity', data)
}

// 获取图谱可视化
export const getVisually = async (data) => {
  return await post('/kgqa/ossId/show', data)
}
