feat(breadcrumbs): implement reusable breadcrumbs component and update usage
refactor(chunk): enhance chunk list with bulk operations and improved UI
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import api from './api';
|
||||
import request, { post } from '@/utils/request';
|
||||
import type { AxiosRequestConfig } from 'axios';
|
||||
import type {
|
||||
IFetchKnowledgeListRequestBody,
|
||||
IFetchKnowledgeListRequestParams,
|
||||
@@ -137,9 +138,10 @@ const knowledgeService = {
|
||||
},
|
||||
|
||||
// 获取文档文件
|
||||
getDocumentFile: (params: { doc_id: string }) => {
|
||||
getDocumentFile: (params: { doc_id: string }, config?: AxiosRequestConfig) => {
|
||||
return request.get(`${api.get_document_file}/${params.doc_id}`, {
|
||||
responseType: 'blob'
|
||||
responseType: 'blob',
|
||||
...config
|
||||
});
|
||||
},
|
||||
|
||||
@@ -185,8 +187,8 @@ const knowledgeService = {
|
||||
return request.get(api.get_chunk, { params });
|
||||
},
|
||||
|
||||
// 切换分块状态
|
||||
switchChunk: (data: { chunk_ids: string[]; available_int: number }) => {
|
||||
// 切换分块状态 available_int 是否启用,0:未启用,1:启用
|
||||
switchChunk: (data: { chunk_ids: string[]; available_int: number, doc_id: string }) => {
|
||||
return post(api.switch_chunk, data);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user