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

Optimize getEndingNodes #2133

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Conversation

mokeyish
Copy link
Contributor

@mokeyish mokeyish commented Apr 9, 2024

If there are multiple end nodes, only one needs to pass verification, and the others are automatically ignored.

This allows us to temporarily disconnect a node without deleting it.

@HenryHengZJ
Copy link
Contributor

You mean this allow us to disconnect one of the ending nodes without deleting it? But if you disconnect it, its no longer part of the endingNodes calculation no? Do you have a flow that can better showcase the issue?

@mokeyish
Copy link
Contributor Author

mokeyish commented Apr 10, 2024

When testing the prompt, the examples(for few-shot prompting) is no longer needed. ChatPromptTemplate node needs to disconnect the CustomFunction node(fetch the exmaples from vector database) so that it will no longer be executed.

The current version will consider this CustomFunction node to be an endingNode and prompt an error Ending node must be either a Chain or Agent.

@mokeyish mokeyish force-pushed the fix-getEndingNodes branch 2 times, most recently from caa21e8 to c4d94a4 Compare April 15, 2024 03:01
@HenryHengZJ
Copy link
Contributor

this looks much neater! thanks a lot @mokeyish !

While only making check to get one validation for now, in future we should implement a validation on every component nodes level, instead of the getEndingNodes function at server level.

@HenryHengZJ HenryHengZJ merged commit b7e4fc9 into FlowiseAI:main Apr 19, 2024
2 checks passed
@llattarini1982
Copy link

Hello guys, I am getting this issue after the commit of this:failed to solve: process "/bin/sh -c pnpm build" did not complete successfully: exit code: 1-

Any suggestion how to solve it?
Thanks

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

3 participants