-
Notifications
You must be signed in to change notification settings - Fork 7k
feat:add batch processing note #6626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gaga0714
wants to merge
9
commits into
labring:main
Choose a base branch
from
gaga0714:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+585
−23
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3ea3a81
fix:修复判断器 arrayAny 类型无判断条件可选
gaga0714 d725b8f
fix:系统工具集不显示版本
gaga0714 b51f402
fix:修复视频音频自定义文件类型流程开始无文件链接变量
gaga0714 faa769f
fix:输入框会转义成markdown
gaga0714 99b7b4b
docs:新增修复
gaga0714 b1b7d49
Merge pull request #1 from gaga0714/fix/0319
gaga0714 41df481
feat: add batch processing node
gaga0714 1bafede
Merge branch 'main' into feat/batchNotes
gaga0714 2e05fcf
Merge pull request #2 from gaga0714/feat/batchNotes
gaga0714 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
96 changes: 96 additions & 0 deletions
96
packages/global/core/workflow/template/system/loop/batch.ts
This file contains hidden or 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,96 @@ | ||
| import { | ||
| FlowNodeInputTypeEnum, | ||
| FlowNodeOutputTypeEnum, | ||
| FlowNodeTypeEnum | ||
| } from '../../../node/constant'; | ||
| import { type FlowNodeTemplateType } from '../../../type/node'; | ||
| import { | ||
| FlowNodeTemplateTypeEnum, | ||
| NodeInputKeyEnum, | ||
| NodeOutputKeyEnum, | ||
| WorkflowIOValueTypeEnum | ||
| } from '../../../constants'; | ||
| import { i18nT } from '../../../../../../web/i18n/utils'; | ||
| import { | ||
| Input_Template_Children_Node_List, | ||
| Input_Template_LOOP_NODE_OFFSET, | ||
| Input_Template_Node_Height, | ||
| Input_Template_Node_Width | ||
| } from '../../input'; | ||
|
|
||
| export const BatchNode: FlowNodeTemplateType = { | ||
| id: FlowNodeTypeEnum.batch, | ||
| templateType: FlowNodeTemplateTypeEnum.tools, | ||
| flowNodeType: FlowNodeTypeEnum.batch, | ||
| showSourceHandle: true, | ||
| showTargetHandle: true, | ||
| avatar: 'core/workflow/template/loop', | ||
| avatarLinear: 'core/workflow/template/loopLinear', | ||
| colorSchema: 'violetDeep', | ||
| name: i18nT('workflow:batch'), | ||
| intro: i18nT('workflow:intro_batch'), | ||
| showStatus: true, | ||
| inputs: [ | ||
| { | ||
| key: NodeInputKeyEnum.loopInputArray, | ||
| renderTypeList: [FlowNodeInputTypeEnum.reference], | ||
| valueType: WorkflowIOValueTypeEnum.arrayAny, | ||
| required: true, | ||
| label: i18nT('workflow:loop_input_array'), | ||
| value: [] | ||
| }, | ||
| { | ||
| key: NodeInputKeyEnum.batchParallelConcurrency, | ||
| renderTypeList: [FlowNodeInputTypeEnum.numberInput, FlowNodeInputTypeEnum.reference], | ||
| selectedTypeIndex: 0, | ||
| valueType: WorkflowIOValueTypeEnum.number, | ||
| required: true, | ||
| label: i18nT('workflow:batch_parallel_concurrency'), | ||
| min: 1, | ||
| max: 10, | ||
| value: 5 | ||
| }, | ||
| { | ||
| key: NodeInputKeyEnum.batchParallelRetryTimes, | ||
| renderTypeList: [FlowNodeInputTypeEnum.numberInput], | ||
| valueType: WorkflowIOValueTypeEnum.number, | ||
| required: true, | ||
| label: i18nT('workflow:batch_parallel_retry_times'), | ||
| min: 0, | ||
| max: 5, | ||
| value: 3 | ||
| }, | ||
| Input_Template_Children_Node_List, | ||
| Input_Template_Node_Width, | ||
| Input_Template_Node_Height, | ||
| Input_Template_LOOP_NODE_OFFSET | ||
| ], | ||
| outputs: [ | ||
| { | ||
| id: NodeOutputKeyEnum.loopArray, | ||
| key: NodeOutputKeyEnum.loopArray, | ||
| label: i18nT('workflow:batch_result_success'), | ||
| description: i18nT('workflow:batch_result_success_tip'), | ||
| type: FlowNodeOutputTypeEnum.static, | ||
| valueType: WorkflowIOValueTypeEnum.arrayAny | ||
| }, | ||
| { | ||
| id: NodeOutputKeyEnum.batchRawResult, | ||
| key: NodeOutputKeyEnum.batchRawResult, | ||
| label: i18nT('workflow:batch_result_raw'), | ||
| description: i18nT('workflow:batch_result_raw_tip'), | ||
| required: true, | ||
| type: FlowNodeOutputTypeEnum.static, | ||
| valueType: WorkflowIOValueTypeEnum.arrayObject | ||
| }, | ||
| { | ||
| id: NodeOutputKeyEnum.batchStatus, | ||
| key: NodeOutputKeyEnum.batchStatus, | ||
| label: i18nT('workflow:batch_status'), | ||
| description: i18nT('workflow:batch_status_tip'), | ||
| required: true, | ||
| type: FlowNodeOutputTypeEnum.static, | ||
| valueType: WorkflowIOValueTypeEnum.string | ||
| } | ||
| ] | ||
| }; |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -19,13 +19,14 @@ export const LoopEndNode: FlowNodeTemplateType = { | |
| avatarLinear: 'core/workflow/template/loopEndLinear', | ||
| colorSchema: 'violetDeep', | ||
| name: i18nT('workflow:loop_end'), | ||
| intro: i18nT('workflow:loop_end_intro'), | ||
| showStatus: false, | ||
| inputs: [ | ||
| { | ||
| key: NodeInputKeyEnum.loopEndInput, | ||
| renderTypeList: [FlowNodeInputTypeEnum.reference], | ||
| valueType: WorkflowIOValueTypeEnum.any, | ||
| label: '', | ||
| label: i18nT('workflow:loop_end_intro'), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个也不用改? |
||
| required: true, | ||
| value: [] | ||
| } | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不用改,反正不能加新的了