refactor: RAG Refactor (#985)

Co-authored-by: Aralhi <xiaoping0501@gmail.com>
Co-authored-by: csunny <cfqsunny@163.com>
This commit is contained in:
Aries-ckt
2024-01-03 09:45:26 +08:00
committed by GitHub
parent 90775aad50
commit 9ad70a2961
206 changed files with 5766 additions and 2419 deletions

View File

@@ -78,6 +78,36 @@ export type IDocumentResponse = {
total: number;
};
export type IStrategyParameter = {
param_name: string;
param_type: string;
default_value?: string | number;
};
export type IChunkStrategyResponse = {
strategy: string;
name: string;
parameters: Array<IStrategyParameter>;
suffix: Array<string>;
type: Array<string>;
};
export type IStrategyProps = {
chunk_strategy: string;
chunk_size?: number;
chunk_overlap?: number;
};
export type ISyncBatchParameter = {
doc_id: number;
name?: string;
chunk_parameters: IStrategyProps;
};
export type ISyncBatchResponse = {
tasks: Array<number>;
};
export type ChunkListParams = {
document_id?: string | number;
page: number;
@@ -109,6 +139,13 @@ export type StepChangeParams = {
label: 'forward' | 'back' | 'finish';
spaceName?: string;
docType?: string;
files?: Array<File>;
};
export type File = {
name: string;
doc_id: number;
status?: string;
};
export type SummaryParams = {