import request from '@/utils/request'

// 查询知识库列表
export function listKnowledge(query) {
  return request({
    url: '/system/knowledge/allList',
    method: 'get',
    params: query
  })
}

// 查询知识库文件-文本/文档
export function listKnowledgeDocText(query) {
  return request({
    url: '/system/knowledgeDocument/list',
    method: 'get',
    params: query
  })
}

// 修改知识库文件-重命名
export function updateDocumentName(data) {
  return request({
    url: '/system/knowledgeDocument/updateDocumentName',
    method: 'post',
    data: data
  })
}

// 创建知识库-文本
export function addDocument(data) {
  return request({
    url: '/system/knowledgeDocument/addDocument',
    method: 'post',
    data: data
  })
}

// 删除知识库-文本
export function deleteDocument(data) {
  return request({
    url: '/system/knowledgeDocument/deleteDocument',
    method: 'post',
    data: data
  })
}



// 查询知识库文件-图片
export function listKnowledgeDocImages(query) {
  return request({
    url: '/system/knowledgeDocument/datasetsImages',
    method: 'get',
    params: query
  })
}

// 创建知识库-图片
export function addImage(data) {
  return request({
    url: '/system/knowledgeDocument/addImage',
    method: 'post',
    data: data
  })
}

// 知识库-图片-描述
export function updateImageCaption(data) {
  return request({
    url: '/system/knowledgeDocument/updateImageCaption',
    method: 'post',
    data: data
  })
}













