mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-02 13:57:30 +08:00
Feat: Add a data compilation layer. (#16777)
### Summary Feat: Add a data compilation layer.
This commit is contained in:
58
web/src/interfaces/request/compilation-template.ts
Normal file
58
web/src/interfaces/request/compilation-template.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
export interface IFetchCompilationTemplatesRequestParams {
|
||||
keywords?: string;
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
kind?: string;
|
||||
}
|
||||
|
||||
export interface ICompilationTemplateSectionRequest {
|
||||
description?: string;
|
||||
fields: Array<Record<string, string>>;
|
||||
}
|
||||
|
||||
export interface ICompilationTemplateRaptorConfigRequest {
|
||||
prompt?: string;
|
||||
max_token?: number;
|
||||
threshold?: number;
|
||||
rechunk?: boolean;
|
||||
}
|
||||
|
||||
export interface ICompilationTemplateConfigRequest {
|
||||
kind?: string;
|
||||
llm_id?: string;
|
||||
entity?: ICompilationTemplateSectionRequest;
|
||||
relation?: ICompilationTemplateSectionRequest;
|
||||
raptor?: ICompilationTemplateRaptorConfigRequest;
|
||||
global_rules?: string;
|
||||
[section: string]:
|
||||
| ICompilationTemplateSectionRequest
|
||||
| ICompilationTemplateRaptorConfigRequest
|
||||
| string
|
||||
| boolean
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface ICreateCompilationTemplateRequestBody {
|
||||
name: string;
|
||||
description?: string;
|
||||
kind: string;
|
||||
config: ICompilationTemplateConfigRequest;
|
||||
}
|
||||
|
||||
export type IUpdateCompilationTemplateRequestBody =
|
||||
Partial<ICreateCompilationTemplateRequestBody>;
|
||||
|
||||
export interface ICreateCompilationTemplateGroupRequestBody {
|
||||
name: string;
|
||||
description?: string;
|
||||
avatar?: string;
|
||||
templates: Array<{
|
||||
name?: string;
|
||||
description?: string;
|
||||
kind: string;
|
||||
config: ICompilationTemplateConfigRequest;
|
||||
}>;
|
||||
}
|
||||
|
||||
export type IUpdateCompilationTemplateGroupRequestBody =
|
||||
Partial<ICreateCompilationTemplateGroupRequestBody>;
|
||||
@@ -22,6 +22,7 @@ export interface IChangeParserConfigRequestBody {
|
||||
clustering_method?: 'gmm' | 'ahc';
|
||||
tree_builder?: 'raptor' | 'psi';
|
||||
};
|
||||
compilation_template_group_id?: string[];
|
||||
// Metadata fields
|
||||
metadata?: Array<{
|
||||
key?: string;
|
||||
|
||||
@@ -39,4 +39,35 @@ export interface IFetchDocumentListRequestBody {
|
||||
run_status?: string[];
|
||||
return_empty_metadata?: boolean;
|
||||
metadata?: Record<string, string[]>;
|
||||
ids?: string[];
|
||||
}
|
||||
|
||||
export interface IFetchArtifactListRequestParams {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
keywords?: string;
|
||||
page_type?: string;
|
||||
topic?: string;
|
||||
}
|
||||
|
||||
export interface IFetchArtifactTopicListRequestParams {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
export interface IFetchArtifactGraphRequestParams {
|
||||
node?: string;
|
||||
}
|
||||
|
||||
export interface IUpdateArtifactPageRequestBody {
|
||||
content_md: string;
|
||||
comments: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface IUpdateArtifactPageRequestParams {
|
||||
pageType: string;
|
||||
slug: string;
|
||||
body: IUpdateArtifactPageRequestBody;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user