Files
ragflow_python/web/src/pages/flow/interface.ts
balibabu 72c6784ff8 feat: fetch flow (#1068)
### What problem does this PR solve?
feat: fetch flow #918 
feat: save graph

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2024-06-06 11:01:14 +08:00

44 lines
874 B
TypeScript

import { FormInstance } from 'antd';
export interface DSLComponentList {
id: string;
name: string;
}
export interface IOperatorForm {
onValuesChange?(changedValues: any, values: any): void;
form?: FormInstance;
}
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 type NodeData = {
label: string;
color: string;
form: IBeginForm | IRetrievalForm | IGenerateForm;
};