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

Bugfix/Handling empty strings when resolving variables #3864

Merged

Conversation

supraface
Copy link
Contributor

@supraface supraface commented Jan 13, 2025

There are some issues.

  1. Not considering empty string when LLMChain process the given promptValues. It makes the 'seen' stack do unexpected things

  2. The value of the variable is the intended empty string, but it doesn't resolve.

  • Expected: Sending a request using a prompt where the emptystring variable (the output of a custom function) is replaced with an empty string.
스크린샷 2025-01-14 오전 1 33 01
  • Current behavior: The value of question is repeatedly assigned to a variable that should be assigned an empty string
스크린샷 2025-01-14 오전 1 32 47

@HenryHengZJ
Copy link
Contributor

in what scenarios you would want an empty string to be passed in as variable value?

@supraface
Copy link
Contributor Author

in what scenarios you would want an empty string to be passed in as variable value?

Optional promptValues.

Some promptValues should be optional, for example, hints could be added to the prompt that are not always present but would help with generation if added.
Of course, you can undefine the field when triggering the chatflow, but it's obviously weird to have an explicit blank replaced by the value of another field.

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 clarifying @supraface !

@HenryHengZJ HenryHengZJ merged commit 5c9f178 into FlowiseAI:main Jan 16, 2025
2 checks passed
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