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: Correct logic error in tool input assignment for ChatflowTool #3903

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

kirisame-wang
Copy link
Contributor

@kirisame-wang kirisame-wang commented Jan 21, 2025

According to the description of customInput for additional parameters of ChatflowTool, leaving it empty allows the LLM to decide the tool's input. Therefore, if customInput is not an empty string, it should be passed to the chatflow.
The previous code incorrectly assigned toolInput to an empty string when customInput was non-empty. This has been corrected to ensure that toolInput is assigned customInput when useQuestionFromChat is false and customInput is non-empty.

The previous code incorrectly assigned `toolInput` to an empty string when `customInput` was non-empty. Corrected the logic to ensure that `toolInput` is assigned `customInput` when `useQuestionFromChat` is false and `customInput` is non-empty.
Copy link
Contributor

@HenryHengZJ HenryHengZJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix!

@HenryHengZJ HenryHengZJ merged commit 50a7339 into FlowiseAI:main Jan 22, 2025
2 checks passed
@kirisame-wang
Copy link
Contributor Author

Thank you as well! I'm thrilled to have made my first contribution to an open source project.

JJK801 pushed a commit to JJK801/Flowise that referenced this pull request Feb 3, 2025
…lowiseAI#3903)

The previous code incorrectly assigned `toolInput` to an empty string when `customInput` was non-empty. Corrected the logic to ensure that `toolInput` is assigned `customInput` when `useQuestionFromChat` is false and `customInput` is non-empty.
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.

2 participants