Skip to content
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

Fix the logic error of getStartingNodes #1832

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Conversation

mokeyish
Copy link
Contributor

@mokeyish mokeyish commented Feb 28, 2024

For the flow graph like below, the original logic for calculating depth is wrong.

  graph LR;
      EndNode-->Y;
      Y-->Z;
      EndNode-->B;
      B-->C;
      C-->D;
      D-->Y;

Y will be skipped early, in fact, it has the second greatest depth.

edit:

Calculation order

  graph LR;
      Configration --> Initialization
      Initialization -- Reuse results--> EndNode
      Initialization --> A
      A --> B
      B --> C
      C --> EndNode

@HenryHengZJ
Copy link
Contributor

im not sure if such flow is allowed, the only way you can split the path is using If Else node, and even after splitting the path, they remain on seperate path and are not allowed to rejoin. do you have a working chatflow that shows this type of flow?

@mokeyish
Copy link
Contributor Author

mokeyish commented Feb 29, 2024

The Y&Z, you can think it as the global initializaton/configuration(it's very slow). It would be better to reuse the results and avoid double calculations.

It requires PR #1834.

@mokeyish
Copy link
Contributor Author

mokeyish commented Mar 4, 2024

@HenryHengZJ Hi, what are your concerns about this PR? Currently this PR and #1834 are working fine in my local evironment.

@HenryHengZJ
Copy link
Contributor

@HenryHengZJ Hi, what are your concerns about this PR? Currently this PR and #1834 are working fine in my local evironment.

sorry for late getting back. Left a comment on #1834

@HenryHengZJ HenryHengZJ merged commit 474681e into FlowiseAI:main Mar 12, 2024
2 checks passed
@mokeyish mokeyish deleted the patch-2 branch March 12, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants