-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: [Workflow Tool] Missing Document Segmentation Component #4982
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -976,7 +976,13 @@ const toolMenuNodes = [ | |
| }, | ||
| { | ||
| label: t('views.knowledge.title'), | ||
| list: [searchKnowledgeNode, searchDocumentNode, rerankerNode, documentExtractNode], | ||
| list: [ | ||
| searchKnowledgeNode, | ||
| searchDocumentNode, | ||
| rerankerNode, | ||
| documentExtractNode, | ||
| documentSplitNode, | ||
| ], | ||
| }, | ||
| { | ||
| label: t('workflow.nodes.classify.businessLogic'), | ||
|
|
@@ -1043,14 +1049,13 @@ export const toolLibNode = { | |
| */ | ||
| export const toolWorkflowLibNode = { | ||
| type: WorkflowType.ToolWorkflowLib, | ||
| text: t('workflow.nodes.toolWorlflowNode.text','工作流工具'), | ||
| label: t('workflow.nodes.toolWorlflowNode.label','工作流工具'), | ||
| text: t('workflow.nodes.toolWorlflowNode.text', '工作流工具'), | ||
| label: t('workflow.nodes.toolWorlflowNode.label', '工作流工具'), | ||
| height: 170, | ||
| properties: { | ||
| stepName: t('workflow.nodes.toolWorlflowNode.label','工作流工具'), | ||
| stepName: t('workflow.nodes.toolWorlflowNode.label', '工作流工具'), | ||
| config: { | ||
| fields: [ | ||
| ], | ||
| fields: [], | ||
| }, | ||
| }, | ||
| } | ||
|
Contributor
Author
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. There are no apparent errors or issues with the provided code snippet. The only suggestion would be to consider adding more descriptive labels for some of the nodes, such as "Document Split" instead of just "documentSplit". This could improve readability when using the interface. |
||
|
|
||
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.
The provided code seems to have an issue related to handling different workflow modes. The
executemethod is called regardless of whether theworkflow_modeis one of the specified knowledge loop workflows (KNOWLEDGE LOOP, TOOL_LOOP). This can be improved by modifying the logic inside_run()to handle these mode-specific conditions:This ensures that when a knowledge loop-related workflow mode is detected, the
knowledge_idparameter is set toNone. You should adjust this according to your actual use case for specifying default or custom values in these cases.