import request from '@/utils/request'

/* 查询知识库列表 */
export function listBuckets(data) {
  return request({
    url: '/kbm/selectBucketInfo',//'/minio/listBuckets',
    method: 'post',
    data
  })
}

/* 新增知识库 */
export function createBucket(data) {
  return request({
    url: '/minio/createBucket',
    method: 'post',
    data
  })
}

/* 编辑知识库  */
export function updateKbm(data) {
  return request({
    url: '/kbm/updateKbm',
    method: 'post',
    data
  })
}

/* 删除知识库  kbm/deleteBucket*/
export function deleteBucket(data) {
  return request({
    url: '/kbm/deleteBucket',
    method: 'post',
    data
  })
}

/* 获取指定的内部信息*/

export function getBucketContents(data) {
  return request({
    url: '/kbm/getFileInfo',
    method: 'post',
    data
  })
}

/* 删除内部文件 */

export function deleteFile(data) {
  return request({
    url: '/kbm/deleteDocument',
    method: 'post',
    data
  })
}

/* 下载  */

export function nameGetUrl(data) {
  return request({
    url: '/kbm/getUrl',
    method: 'post',
    data
  })
}

/* 上传 */

export function postUpload(data) {
  return request({
    url: '/minio/post',
    method: 'post',
    data
  })
}

/* 修改文档名称 /minio/renameFile */
export function renameFile(data) {
  return request({
    url: '/kbm/updateName',
    method: 'post',
    data
  })
}

/* 解析方法 /kbm/analysis */
export function analysis(data) {
  return request({
    url: '/kbm/analysis',
    method: 'post',
    data
  })
}
/* 文本信息 /kbm/searchTaskInfo */
export function searchTaskInfo(data) {
  return request({
    url: '/kbm/searchTaskInfo',
    method: 'post',
    data
  })
}

/* /kbm/batchAnalysis  批量解析 */
export function batchAnalysis(data) {
  return request({
    url: '/kbm/batchAnalysis',
    method: 'post',
    data
  })
}
/* 获取类型 */

export function getSuffixName(data) {
  return request({
    url: '/kbm/getSuffixName',
    method: 'post',
    data
  })
}

/* 通过id查询状态 /kbm/getRunStatus */

export function getRunStatus(data) {
  return request({
    url: '/kbm/getRunStatus',
    method: 'post',
    data
  })
}

/* 目录列表 */
export function selectTypeList(data) {
  return request({
    url: '/docType/selectTypeList',
    method: 'post',
    data
  })
}

/* 新增目录 */

export function insertType(data) {
  return request({
    url: '/docType/insertType',
    method: 'post',
    data
  })
}

/* 编辑目录 */

export function updateType(data) {
  return request({
    url: '/docType/updateType',
    method: 'post',
    data
  })
}
/* 查看目录 */

export function Info(data) {
  return request({
    url: '/docType/Info',
    method: 'post',
    data
  })
}

/* 删除目录 */

export function deleteType(data) {
  return request({
    url: '/docType/delete',
    method: 'post',
    data
  })
}

/* 批量移动目录 */

export function batchMove(data) {
  return request({
    url: '/kbm/batchMove',
    method: 'post',
    data
  })
}

/* docType/selectType0 */

export function selectType0(data) {
  return request({
    url: '/docType/selectType0',
    method: 'post',
    data
  })
}

/* 获取模型列表 */

export function modelList(data) {
  return request({
    url: 'model/search',
    method: 'post',
    data
  })
}

/* 生成应用  chatbot/configSave */

export function configSave(data) {
  return request({
    url: 'chatbot/configCreart/',
    method: 'post',
    data
  })
}

/* 查询配置列表 */

export function configList(data) {
  return request({
    url: '/chatbot/configuration/list/',
    method: 'post',
    data
  })
}

/* 删除 */

export function configDelete(data) {
  return request({
    url: '/chatbot/configuration/delete/',
    method: 'post',
    data
  })
}
/* 获取模型列表 */

/* export function modelList(data) {
  return request({
    url: 'model-provider/search',
    method: 'post',
    data
  })
} */

  /* 获取首页知识库分类汇总 */

  export function structure_count(data) {
    return request({
      url: '/knowledgebase/structure_count/',
      method: 'post',
      data
    })
  } 

  /* 获取首页文档信息 */
  export function concle_count(data) {
    return request({
      url: '/knowledgebase/concle_count/',
      method: 'post',
      data
    })
  } 

  /* 应用配置类型 */
  export function application_types(data) {
    return request({
      url: '/chatbot/application-types/',
      method: 'post',
      data
    })
  } 

  /* 设置为默认 /chatbot/configuration/set_default/ */

  export function set_default(data) {
    return request({
      url: '/chatbot/configuration/set_default/',
      method: 'post',
      data
    })
  } 

  /* 获取默认id值 */
  export function get_default(data) {
    return request({
      url: 'chatbot/configuration/get_default/',
      method: 'get',
      data
    })
  } 

  /* 查看应用 /chatbot/configurationInfo/ */
  export function configurationInfo(data) {
    return request({
      url: '/chatbot/configurationInfo/',
      method: 'post',
      data
    })
  } 

  /* 批量删除 */

  export function delDocumentList(data) {
    return request({
      url: 'kbm/delDocumentList',
      method: 'post',
      data
    })
  } 
  /* 获取GPU数据 /machines/gpu-info/*/

  export function gpu_info(data) {
    return request({
      url: '/machines/gpu-info/',
      method: 'get',
      data
    })
  } 

   /* 列表 literature-data/list/ */

   export function GET_list(data) {
    return request({
      url: 'literature-data/list/',
      method: 'post',
      data
    })
  } 
  
  /* /literature-data/sync/ */

  export function GET_sync(data) {
    return request({
      url: '/literature-data/sync/',
      method: 'post',
      data
    })
  } 

  /* mq利用率 */

  export function GET_Rbq(data) {
    return request({
      url: '/rabbitmq/info/',
      method: 'get',
      data
    })
  } 

  /* 获取解析进度 */

  export function getdocpro(data) {
    return request({
      url: '/kbm/getdocpro',
      method: 'post',
      data
    })
  } 

  /* 获取解析结果  */
  
  export function getDetail(data) {
    return request({
      url: '/literature-data/detail/',
      method: 'post',
      data
    })
  } 

  /* 新增标签 */

  export function add_tags(data) {
    return request({
      url: '/literature-tags/add_tags/',
      method: 'post',
      data
    })
  } 

  /* 获取标签 */

  export function get_literature_tags(data) {
    return request({
      url: '/literature-tags/get_literature_tags/',
      method: 'get',
      data
    })
  } 

  /* 删除 */

  export function remove_tags(data) {
    return request({
      url: '/literature-tags/remove_tags/',
      method: 'post',
      data
    })
  } 

  /* 搜索 */

  export function search_tags(data) {
    return request({
      url: '/literature-tags/search_tags/',
      method: 'post',
      data
    })
  } 

  /* 编辑  */

  export function edit_tags(data) {
    return request({
      url: '/literature-tags/edit_tags/',
      method: 'post',
      data
    })
  } 