/* * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. * * Licensed under the GNU Affero General Public License, Version 3 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.gnu.org/licenses/agpl-3.0.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import request from '@/config/axios' // AI 文档切片 VO export interface SliceVO { id: string // TODO: Add other fields based on your data model } // AI 文档切片 API export const SliceApi = { // 获得切片分页 getSlicePage: async (params: any) => { return await request.get({ url: '/chat/aigc/docs/slice/page', params }) }, // 获得切片列表 getSliceList: async (params: any) => { return await request.get({ url: '/chat/aigc/docs/slice/list', params }) }, // 获得切片详情 getSlice: async (id: string) => { return await request.get({ url: `/chat/aigc/docs/slice/${id}` }) }, // 创建切片 createSlice: async (data: any) => { return await request.post({ url: '/chat/aigc/docs/slice', data }) }, // 更新切片 updateSlice: async (data: any) => { return await request.put({ url: '/chat/aigc/docs/slice', data }) }, // 删除切片 deleteSlice: async (id: string) => { return await request.delete({ url: `/chat/aigc/docs/slice/${id}` }) } }