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

convert the parameter 'text' to uppercase in the function 'parse' of the class BooleanOutputParser #5397

Merged
merged 3 commits into from
May 30, 2023

Conversation

ARSblithe212
Copy link
Contributor

when the LLMs output 'yes|no',BooleanOutputParser can parse it to 'True|False', fix the ValueError in parse().

Fixes # (issue)
#5396
#5396

@hwchase17

Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

this is a specific to the true_val and false_val tho. if I override those and pass in true_val="True", false_val="False" then this wont work

@ARSblithe212
Copy link
Contributor Author

yes,you are right. Can I transform them all to uppercase

@hwchase17 hwchase17 added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label May 30, 2023
@dev2049 dev2049 merged commit e31705b into langchain-ai:master May 30, 2023
vowelparrot pushed a commit that referenced this pull request May 31, 2023
…the class BooleanOutputParser (#5397)

when the LLMs output 'yes|no',BooleanOutputParser can parse it to
'True|False', fix the ValueError in parse().
<!--
when use the BooleanOutputParser in the chain_filter.py, the LLMs output
'yes|no',the function 'parse' will throw ValueError。
-->

Fixes # (issue)
  #5396
  #5396

---------

Co-authored-by: gaofeng27692 <gaofeng27692@hundsun.com>
@danielchalef danielchalef mentioned this pull request Jun 5, 2023
Undertone0809 pushed a commit to Undertone0809/langchain that referenced this pull request Jun 19, 2023
…the class BooleanOutputParser (langchain-ai#5397)

when the LLMs output 'yes|no',BooleanOutputParser can parse it to
'True|False', fix the ValueError in parse().
<!--
when use the BooleanOutputParser in the chain_filter.py, the LLMs output
'yes|no',the function 'parse' will throw ValueError。
-->

Fixes # (issue)
  langchain-ai#5396
  langchain-ai#5396

---------

Co-authored-by: gaofeng27692 <gaofeng27692@hundsun.com>
This was referenced Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants