Skip to content

Conversation

@thekaranacharya
Copy link
Contributor

@thekaranacharya thekaranacharya commented Mar 11, 2024

  • Fixes this [bug] ToxicLanguage doesn't work with streaming and OpenAI  #619
  • Was previously always returning None as error for StringSchema's parse() method. This allowed even empty strings/None to fail validators which expect only non-empty strings.
  • Solution: Return True as error if empty string, else False -> This will enable move_to_next here: and will continue until a non-empty string is found.

@thekaranacharya thekaranacharya changed the title Bugfix #619 Bugfix for empty string validation Mar 11, 2024
@thekaranacharya thekaranacharya self-assigned this Mar 11, 2024
@thekaranacharya
Copy link
Contributor Author

Tested both with and without streaming for strings, works!

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.

3 participants