fastGptCollection.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import request from '@/utils/request'
  2. // 查询集合列表
  3. export function listFastGptCollection(query) {
  4. return request({
  5. url: '/fastGpt/fastGptCollection/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询集合详细
  11. export function getFastGptCollection(collectionId) {
  12. return request({
  13. url: '/fastGpt/fastGptCollection/' + collectionId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增集合
  18. export function addFastGptCollection(data) {
  19. return request({
  20. url: '/fastGpt/fastGptCollection',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改集合
  26. export function updateFastGptCollection(data) {
  27. return request({
  28. url: '/fastGpt/fastGptCollection',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 删除集合
  34. export function delFastGptCollection(collectionId) {
  35. return request({
  36. url: '/fastGpt/fastGptCollection/' + collectionId,
  37. method: 'delete'
  38. })
  39. }
  40. // 导出集合
  41. export function exportFastGptCollection(query) {
  42. return request({
  43. url: '/fastGpt/fastGptCollection/export',
  44. method: 'get',
  45. params: query
  46. })
  47. }
  48. export function syncCollection(datasetId) {
  49. return request({
  50. url: '/fastGpt/fastGptCollection/syncCollection/'+datasetId,
  51. method: 'get',
  52. })
  53. }