We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Line 27 of protectai/llm-guard/blob/main/examples/openai_api.py says if any(results_valid.values()) is False:
protectai/llm-guard/blob/main/examples/openai_api.py
if any(results_valid.values()) is False:
any(results_valid.values()) evaluates to True if any of the values are True. So this security check will pass if any of the values is true.
any(results_valid.values())
To Reproduce Steps to reproduce the behavior:
Expected behavior It should fail if any of the values is false.
The text was updated successfully, but these errors were encountered:
Hey @jdwhitaker , thanks for submitting this bug report. I will fix it. Indeed, there is an issue
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Line 27 of
protectai/llm-guard/blob/main/examples/openai_api.py
saysif any(results_valid.values()) is False:
any(results_valid.values())
evaluates to True if any of the values are True. So this security check will pass if any of the values is true.To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should fail if any of the values is false.
The text was updated successfully, but these errors were encountered: