forked from labring/FastGPT
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Workflow loop node;feat: support openai o1;perf: query extensio…
…n prompt;fix: intro was not delivered when the datase was created (labring#2719) * feat: loop node (labring#2675) * loop node frontend * loop-node * fix-code * fix version * fix * fix * fix * perf: loop array code * perf: get histories error tip * feat: support openai o1 * perf: query extension prompt * feat: 4811 doc * remove log * fix: loop node zindex & variable picker type (labring#2710) * perf: performance * perf: workflow performance * remove uninvalid code * perf:code * fix: invoice table refresh * perf: loop node data type * fix: loop node store assistants * perf: target connection * feat: loop node support help line * perf: add default icon --------- Co-authored-by: heheer <[email protected]>
- Loading branch information
1 parent
1ebc95a
commit 2bdda46
Showing
86 changed files
with
2,002 additions
and
719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
packages/global/core/workflow/template/system/loop/loop.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { | ||
FlowNodeInputTypeEnum, | ||
FlowNodeOutputTypeEnum, | ||
FlowNodeTypeEnum | ||
} from '../../../node/constant'; | ||
import { FlowNodeTemplateType } from '../../../type/node'; | ||
import { | ||
FlowNodeTemplateTypeEnum, | ||
NodeInputKeyEnum, | ||
NodeOutputKeyEnum, | ||
WorkflowIOValueTypeEnum | ||
} from '../../../constants'; | ||
import { getHandleConfig } from '../../utils'; | ||
import { i18nT } from '../../../../../../web/i18n/utils'; | ||
import { | ||
Input_Template_Children_Node_List, | ||
Input_Template_Node_Height, | ||
Input_Template_Node_Width | ||
} from '../../input'; | ||
|
||
export const LoopNode: FlowNodeTemplateType = { | ||
id: FlowNodeTypeEnum.loop, | ||
templateType: FlowNodeTemplateTypeEnum.tools, | ||
flowNodeType: FlowNodeTypeEnum.loop, | ||
sourceHandle: getHandleConfig(true, true, true, true), | ||
targetHandle: getHandleConfig(true, true, true, true), | ||
avatar: 'core/workflow/template/loop', | ||
name: i18nT('workflow:loop'), | ||
intro: i18nT('workflow:intro_loop'), | ||
showStatus: true, | ||
version: '4811', | ||
inputs: [ | ||
{ | ||
key: NodeInputKeyEnum.loopInputArray, | ||
renderTypeList: [FlowNodeInputTypeEnum.reference], | ||
valueType: WorkflowIOValueTypeEnum.arrayAny, | ||
required: true, | ||
label: i18nT('workflow:loop_input_array'), | ||
value: [] | ||
}, | ||
Input_Template_Children_Node_List, | ||
Input_Template_Node_Width, | ||
Input_Template_Node_Height | ||
], | ||
outputs: [ | ||
{ | ||
id: NodeOutputKeyEnum.loopArray, | ||
key: NodeOutputKeyEnum.loopArray, | ||
label: i18nT('workflow:loop_result'), | ||
type: FlowNodeOutputTypeEnum.static, | ||
valueType: WorkflowIOValueTypeEnum.arrayAny | ||
} | ||
] | ||
}; |
34 changes: 34 additions & 0 deletions
34
packages/global/core/workflow/template/system/loop/loopEnd.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { i18nT } from '../../../../../../web/i18n/utils'; | ||
import { | ||
FlowNodeTemplateTypeEnum, | ||
NodeInputKeyEnum, | ||
WorkflowIOValueTypeEnum | ||
} from '../../../constants'; | ||
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../../node/constant'; | ||
import { FlowNodeTemplateType } from '../../../type/node'; | ||
import { getHandleConfig } from '../../utils'; | ||
|
||
export const LoopEndNode: FlowNodeTemplateType = { | ||
id: FlowNodeTypeEnum.loopEnd, | ||
templateType: FlowNodeTemplateTypeEnum.systemInput, | ||
flowNodeType: FlowNodeTypeEnum.loopEnd, | ||
sourceHandle: getHandleConfig(false, false, false, false), | ||
targetHandle: getHandleConfig(false, false, false, true), | ||
unique: true, | ||
forbidDelete: true, | ||
avatar: 'core/workflow/template/loopEnd', | ||
name: i18nT('workflow:loop_end'), | ||
showStatus: false, | ||
version: '4811', | ||
inputs: [ | ||
{ | ||
key: NodeInputKeyEnum.loopEndInput, | ||
renderTypeList: [FlowNodeInputTypeEnum.reference], | ||
valueType: WorkflowIOValueTypeEnum.any, | ||
label: '', | ||
required: true, | ||
value: [] | ||
} | ||
], | ||
outputs: [] | ||
}; |
34 changes: 34 additions & 0 deletions
34
packages/global/core/workflow/template/system/loop/loopStart.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../../node/constant'; | ||
import { FlowNodeTemplateType } from '../../../type/node.d'; | ||
import { | ||
FlowNodeTemplateTypeEnum, | ||
NodeInputKeyEnum, | ||
WorkflowIOValueTypeEnum | ||
} from '../../../constants'; | ||
import { getHandleConfig } from '../../utils'; | ||
import { i18nT } from '../../../../../../web/i18n/utils'; | ||
|
||
export const LoopStartNode: FlowNodeTemplateType = { | ||
id: FlowNodeTypeEnum.loopStart, | ||
templateType: FlowNodeTemplateTypeEnum.systemInput, | ||
flowNodeType: FlowNodeTypeEnum.loopStart, | ||
sourceHandle: getHandleConfig(false, true, false, false), | ||
targetHandle: getHandleConfig(false, false, false, false), | ||
avatar: 'core/workflow/template/loopStart', | ||
name: i18nT('workflow:loop_start'), | ||
unique: true, | ||
forbidDelete: true, | ||
showStatus: false, | ||
version: '4811', | ||
inputs: [ | ||
{ | ||
key: NodeInputKeyEnum.loopStartInput, | ||
renderTypeList: [FlowNodeInputTypeEnum.hidden], | ||
valueType: WorkflowIOValueTypeEnum.any, | ||
label: '', | ||
required: true, | ||
value: '' | ||
} | ||
], | ||
outputs: [] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.