feat(knowledge): add chunk management and document processing features
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { RunningStatus } from '@/constants/knowledge';
|
||||
import type { IDocumentInfo } from './document';
|
||||
|
||||
|
||||
/**
|
||||
@@ -426,6 +427,15 @@ export interface INextTestingResult {
|
||||
isRuned?: boolean;
|
||||
}
|
||||
|
||||
export interface IChunkListResult {
|
||||
/** 文档块列表 */
|
||||
chunks: IChunk[];
|
||||
/** 文档信息列表 */
|
||||
doc: IDocumentInfo[]
|
||||
/** 总匹配数量 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重命名标签类型
|
||||
* 用于标签重命名操作
|
||||
|
||||
@@ -16,3 +16,19 @@ export interface IDocumentMetaRequestBody {
|
||||
documentId: string;
|
||||
meta: string; // json format string
|
||||
}
|
||||
|
||||
// export const RUNNING_STATUS_KEYS = Object.freeze({
|
||||
// UNSTART: '0', // need to run
|
||||
// RUNNING: '1', // need to cancel
|
||||
// CANCEL: '2', // need to refresh
|
||||
// DONE: '3', // need to refresh
|
||||
// FAIL: '4', // need to refresh
|
||||
// } as const)
|
||||
|
||||
export interface IRunDocumentRequestBody {
|
||||
doc_ids: Array<string | number> | string | number;
|
||||
// running status 1 run 2 cancel - operations
|
||||
run: number;
|
||||
delete: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IPaginationRequestBody } from './base';
|
||||
import { type IPaginationRequestBody } from './base';
|
||||
|
||||
export interface IFileListRequestBody extends IPaginationRequestBody {
|
||||
parent_id?: string; // folder id
|
||||
|
||||
@@ -49,3 +49,11 @@ export interface IFetchDocumentListRequestBody {
|
||||
suffix?: string[];
|
||||
run_status?: string[];
|
||||
}
|
||||
|
||||
|
||||
export interface IFetchChunkListRequestBody {
|
||||
doc_id?: string;
|
||||
keywords?: string;
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user