mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 16:26:51 +08:00
### What problem does this PR solve? Feat: The Begin and IterationStart operators cannot be deleted using shortcut keys #4287 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,51 +1,13 @@
|
||||
import { RAGFlowNodeType } from '@/interfaces/database/flow';
|
||||
import { FormInstance } from 'antd';
|
||||
import { Node } from 'reactflow';
|
||||
|
||||
export interface DSLComponentList {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IOperatorForm {
|
||||
onValuesChange?(changedValues: any, values: any): void;
|
||||
form?: FormInstance;
|
||||
node?: Node<NodeData>;
|
||||
node?: RAGFlowNodeType;
|
||||
nodeId?: string;
|
||||
}
|
||||
|
||||
export interface IBeginForm {
|
||||
prologue?: string;
|
||||
}
|
||||
|
||||
export interface IRetrievalForm {
|
||||
similarity_threshold?: number;
|
||||
keywords_similarity_weight?: number;
|
||||
top_n?: number;
|
||||
top_k?: number;
|
||||
rerank_id?: string;
|
||||
empty_response?: string;
|
||||
kb_ids: string[];
|
||||
}
|
||||
|
||||
export interface IGenerateForm {
|
||||
max_tokens?: number;
|
||||
temperature?: number;
|
||||
top_p?: number;
|
||||
presence_penalty?: number;
|
||||
frequency_penalty?: number;
|
||||
cite?: boolean;
|
||||
prompt: number;
|
||||
llm_id: string;
|
||||
parameters: { key: string; component_id: string };
|
||||
}
|
||||
export interface ICategorizeItem {
|
||||
name: string;
|
||||
description?: string;
|
||||
examples?: string;
|
||||
to?: string;
|
||||
index: number;
|
||||
}
|
||||
|
||||
export interface IGenerateParameter {
|
||||
id?: string;
|
||||
key: string;
|
||||
@ -56,49 +18,6 @@ export interface IInvokeVariable extends IGenerateParameter {
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export type ICategorizeItemResult = Record<
|
||||
string,
|
||||
Omit<ICategorizeItem, 'name'>
|
||||
>;
|
||||
export interface ICategorizeForm extends IGenerateForm {
|
||||
category_description: ICategorizeItemResult;
|
||||
}
|
||||
|
||||
export interface IRelevantForm extends IGenerateForm {
|
||||
yes: string;
|
||||
no: string;
|
||||
}
|
||||
|
||||
export interface ISwitchCondition {
|
||||
items: ISwitchItem[];
|
||||
logical_operator: string;
|
||||
to: string;
|
||||
}
|
||||
|
||||
export interface ISwitchItem {
|
||||
cpn_id: string;
|
||||
operator: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface ISwitchForm {
|
||||
conditions: ISwitchCondition[];
|
||||
end_cpn_id: string;
|
||||
no: string;
|
||||
}
|
||||
|
||||
export type NodeData = {
|
||||
label: string; // operator type
|
||||
name: string; // operator name
|
||||
color?: string;
|
||||
form:
|
||||
| IBeginForm
|
||||
| IRetrievalForm
|
||||
| IGenerateForm
|
||||
| ICategorizeForm
|
||||
| ISwitchForm;
|
||||
};
|
||||
|
||||
export type IPosition = { top: number; right: number; idx: number };
|
||||
|
||||
export interface BeginQuery {
|
||||
|
||||
Reference in New Issue
Block a user