Files
ragflow/web/src/interfaces/database/flow.ts
balibabu a1a825c830 Feat: Add the iteration Node #4242 (#4247)
### What problem does this PR solve?

Feat: Add the iteration Node #4242

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2024-12-27 11:24:17 +08:00

59 lines
1.1 KiB
TypeScript

import { Edge, Node } from 'reactflow';
import { IReference, Message } from './chat';
export type DSLComponents = Record<string, IOperator>;
export interface DSL {
components: DSLComponents;
history: any[];
path?: string[][];
answer?: any[];
graph?: IGraph;
messages: Message[];
reference: IReference[];
}
export interface IOperator {
obj: IOperatorNode;
downstream: string[];
upstream: string[];
parent_id?: string;
}
export interface IOperatorNode {
component_name: string;
params: Record<string, unknown>;
}
export interface IGraph {
nodes: Node[];
edges: Edge[];
}
export declare interface IFlow {
avatar?: null | string;
canvas_type: null;
create_date: string;
create_time: number;
description: null;
dsl: DSL;
id: string;
title: string;
update_date: string;
update_time: number;
user_id: string;
}
export interface IFlowTemplate {
avatar: string;
canvas_type: string;
create_date: string;
create_time: number;
description: string;
dsl: DSL;
id: string;
title: string;
update_date: string;
update_time: number;
}