import request from '@/utils/request'

// 查询知识库列列表
export function listFastGptDataset(query) {
  return request({
    url: '/fastGpt/fastGptDataset/list',
    method: 'get',
    params: query
  })
}

// 查询知识库列详细
export function getFastGptDataset(datasetId) {
  return request({
    url: '/fastGpt/fastGptDataset/' + datasetId,
    method: 'get'
  })
}

// 新增知识库列
export function addFastGptDataset(data) {
  return request({
    url: '/fastGpt/fastGptDataset',
    method: 'post',
    data: data
  })
}

// 修改知识库列
export function updateFastGptDataset(data) {
  return request({
    url: '/fastGpt/fastGptDataset',
    method: 'put',
    data: data
  })
}

// 删除知识库列
export function delFastGptDataset(datasetId) {
  return request({
    url: '/fastGpt/fastGptDataset/' + datasetId,
    method: 'delete'
  })
}

// 导出知识库列
export function exportFastGptDataset(query) {
  return request({
    url: '/fastGpt/fastGptDataset/export',
    method: 'get',
    params: query
  })
}
//同步
export function syncDataset() {
  return request({
    url: '/fastGpt/fastGptDataset/syncDataset',
    method: 'get',
  })
}

// 导出知识库列
export function getAllDataSetList(query) {
  return request({
    url: '/fastGpt/fastGptDataset/getAllDataSetList',
    method: 'get',
    params: query
  })
}
